Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aichbauer/node-git-commit-range
Get the git commithash within a Range from-to
https://github.com/aichbauer/node-git-commit-range
commit git hash is-git log nodejs range
Last synced: about 1 month ago
JSON representation
Get the git commithash within a Range from-to
- Host: GitHub
- URL: https://github.com/aichbauer/node-git-commit-range
- Owner: aichbauer
- License: mit
- Created: 2017-06-24T10:13:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T16:38:48.000Z (almost 2 years ago)
- Last Synced: 2024-11-13T15:20:23.793Z (about 1 month ago)
- Topics: commit, git, hash, is-git, log, nodejs, range
- Language: JavaScript
- Homepage:
- Size: 1.6 MB
- Stars: 1
- Watchers: 3
- Forks: 4
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# git-commit-range
[![Build Status](https://travis-ci.org/aichbauer/node-git-commit-range.svg?branch=master)](https://travis-ci.org/aichbauer/node-git-commit-range)
[![Build status](https://ci.appveyor.com/api/projects/status/2o83rprgkyfjoxqv?svg=true)](https://ci.appveyor.com/project/rudolfsonjunior/node-git-commit-range)
[![Coverage Status](https://coveralls.io/repos/github/aichbauer/node-git-commit-range/badge.svg?branch=master)](https://coveralls.io/github/aichbauer/node-git-commit-range?branch=master)> Get the git commithash within a Range from-to
## Installation
```sh
$ npm i git-commit-range --save
```
or
```sh
$ yarn add git-commit-range
```## Usage
Returns an array with the commithashes from a specified commit to another specified commit.
```js
const gitCommitRange = require('git-commit-range');gitCommitRange(); // returns all commits (complete hash) since the beginning of the repo of process.cwd()
gitCommitRange({
path: 'my/repo',
from: '15be93c31ad87c9ced03ba0b60fc2fb55c977c5c',
to: '32b940b014322834966d79b109d2d7adec8e3ea3',
include: false,
}); // returns all commits (complete hash) between from and to EXCLUDING from and to, of the path 'my/repo'gitCommitRange({
path: 'my/repo',
from: '15be93c31ad87c9ced03ba0b60fc2fb55c977c5c',
to: '32b940b014322834966d79b109d2d7adec8e3ea3',
}); // returns all commits (complete hash) between from and to INCLUDING from and to, of the path 'my/repo'gitCommitRange({
path: 'my/repo',
from: '15be93c31ad87c9ced03ba0b60fc2fb55c977c5c',
to: '32b940b014322834966d79b109d2d7adec8e3ea3',
type: 'text',
}); // returns all commits as text between from and to INCLUDING from and to, of the path 'my/repo'gitCommitRange({
path: 'my/repo',
from: '15be93c31ad87c9ced03ba0b60fc2fb55c977c5c',
to: '32b940b014322834966d79b109d2d7adec8e3ea3',
short: true,
}); // returns all commits (short hash) between from and to INCLUDING from and to, of the path 'my/repo'gitCommitRange({
path: 'my/repo',
from: '15be93c31ad87c9ced03ba0b60fc2fb55c977c5c',
to: '32b940b014322834966d79b109d2d7adec8e3ea3',
includeMerges: false,
}); // returns all commits between from and to EXCLUDING all merge commits, of the path 'my/repo'
```## LICENSE
MIT © Lukas Aichbauer