An open API service indexing awesome lists of open source software.

https://github.com/lukehsiao/git-stats

:bar_chart: A tool for getting aggregated commit stats
https://github.com/lukehsiao/git-stats

cli git

Last synced: 4 months ago
JSON representation

:bar_chart: A tool for getting aggregated commit stats

Awesome Lists containing this project

README

          


📊

git stats



A tool for getting aggregated commit stats.





Build Status


Version


License



Git Stats parses [log](https://git-scm.com/docs/git-log) information to get stats about the files changed, additions, and deletions.
For example:

$ git stats -r origin..HEAD
Author Commits Changed Files Insertions Deletions Net Δ
Luke Hsiao 67 117 +2616 -1126 +1490
dependabot[bot] 31 62 +203 -267 -64
Total 98 179 +2819 -1393 +1426

Reviewer/Tester Commits
Luke Hsiao 1

## Install

This is a glorified shell script.
As such, it expects that you have `git`, `sort`, and `uniq` installed on your machine and in your `$PATH`.

### From crates.io

```
cargo install git-stats --locked
```

Or, if you use [`cargo-binstall`](https://github.com/cargo-bins/cargo-binstall):

```
cargo binstall git-stats
```

## Usage

```
A tool for getting aggregated commit stats

Usage: git-stats [OPTIONS] [revision-range]

Arguments:
[revision-range] Show only commits in the specified revision range [default: HEAD]

Options:
-e, --email Show the email address of each author
-r, --reviews Show who reviewed/tested commits based on `Acked-by`, `Tested-by`, and `Reviewed-by` git trailers
-s, --sort What column to sort by [default: commits] [possible values: author, commits, files, insertions, deletions, net]
--reverse Whether to reverse the sorting from descending to ascending
-a, --author Limit the commits output to ones with author header lines that match the specified pattern (regular expression)
--since Limit the commits output to ones more recent than a specific date
--until Limit the commits output to ones older than a specific date
-h, --help Print help (see more with '--help')
-V, --version Print version
```

## TODO

- [] It would be nice to support _all_ git log flags automatically, just passing them through directly and then doing the math only.