# git-count-commits

> Get the total number of commits for a repo and a specific revision by shelling out to git.

Latest version **0.1.0** (published 2014-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install git-count-commits
pnpm add git-count-commits
yarn add git-count-commits
bun add git-count-commits
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2014-05-25 |
| First published | 2014-05-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Alexandru Vladutu |
| Maintainers | alessioalex |
| Keywords | git, commits, count, count-commits |

## Links

- npm: https://www.npmjs.com/package/git-count-commits
- Repository: https://github.com/alessioalex/git-count-commits
- Issues: https://github.com/alessioalex/git-count-commits/issues
- npm.io page: https://npm.io/package/git-count-commits

## Dependencies (1)

- [git-execute](https://npm.io/package/git-execute.md) ~0.1.0

## Recent versions

- 0.1.0 (latest) — 2014-05-25

## README

# git-count-commits

Get the total number of commits for a repo and a specific revision by shelling out to git.

## Usage

```js
gitCountCommits(repoPath, revision, callback);
```

Example

```js
var gitCountCommits = require('git-count-commits');
var path = require('path');
var repoPath = path.resolve(process.env.REPO || (__dirname + '/.git'));
var rev = process.env.REV || 'master';

gitCountCommits(repoPath, rev, function(err, commits) {
  if (err) { throw err; }

  console.log('Total commits for %s#%s: \n  = %s', repoPath, rev, commits);
});
```

## Tests

```
npm test
```

## License

MIT

---
_Source: https://npm.io/package/git-count-commits · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
