git-commit-count
Version:
A tool to count the numbers of commits of a git repository
32 lines (22 loc) • 947 B
Markdown
# git-commit-count
[](https://travis-ci.org/aichbauer/node-git-commit-count)
[](https://ci.appveyor.com/project/rudolfsonjunior/node-git-commit-count-akb1b)
[](https://coveralls.io/github/aichbauer/node-git-commit-count?branch=master)
Checks how many commits a git repository has
## Installation
```sh
$ npm i git-commit-count --save
```
or
```sh
$ yarn add git-commit-count
```
## Usage
Returns the number of the amount of git commits. Returns `-1` if it is not a git repository.
```js
const commitCount = require('git-commit-count');
commitCount(); // number of process.cwd()
commitCount('any/git/repo'); // number
```
## LICENSE
MIT © Lukas Aichbauer