A CLI wrapper around git commands to get contributors stats of a repo for all branches.
Supported output formats are table/JSON/CSV. Default output format is table. Stats can be sorted by commits, additions, deletions.
Running for a local copy of https://github.com/nshepperd/gpt-2.git.
$ git remote -v
origin https://github.com/nshepperd/gpt-2.git (fetch)
origin https://github.com/nshepperd/gpt-2.git (push)
$ gitstats -output csv
Contributor,Commits,Additions,Deletions,Files
Neil Shepperd <[email protected]>,40,2092,560,19
Jeff Wu <[email protected]>,25,137298,137136,24
Jeff Wu <[email protected]>,4,478,5,8
Timothy Liu <[email protected]>,3,274,2,2
Ignacio Lopez-Francos <[email protected]>,2,5,5,2
James B. Pollack <[email protected]>,2,2,2,2
Nathan Murthy <[email protected]>,2,8,2,1
Neil Shepperd <[email protected]>,2,141,0,3
子兎音 <[email protected]>,2,2,2,2
Anders <[email protected]>,1,26,0,2
Armaan Bhullar <[email protected]>,1,50,1,3
Biranchi <[email protected]>,1,3,0,1
Madison May <[email protected]>,1,50,0,3
Mathieu Rene <[email protected]>,1,6,2,2
Max Woolf <[email protected]>,1,1,1,1
Memo Akten <[email protected]>,1,17,9,3
N Shepperd <[email protected]>,1,0,0,0
Santosh Heigrujam <[email protected]>,1,123,0,2
Svilen Todorov <[email protected]>,1,1,0,1
stephan orlowsky <[email protected]>,1,6,0,1
$
$ gitstats -o table
+------------------------------------------------+---------+-----------+-----------+-------+
| CONTRIBUTOR | COMMITS | ADDITIONS | DELETIONS | FILES |
+------------------------------------------------+---------+-----------+-----------+-------+
| Neil Shepperd | 40 | 2092 | 560 | 19 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Jeff Wu | 25 | 137298 | 137136 | 24 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Jeff Wu | 4 | 478 | 5 | 8 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Timothy Liu <[email protected]> | 3 | 274 | 2 | 2 |
+------------------------------------------------+---------+-----------+-----------+-------+
| Ignacio Lopez-Francos | 2 | 5 | 5 | 2 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| James B. Pollack | 2 | 2 | 2 | 2 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Nathan Murthy | 2 | 8 | 2 | 1 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Neil Shepperd | 2 | 141 | 0 | 3 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| 子兎音 <[email protected]> | 2 | 2 | 2 | 2 |
+------------------------------------------------+---------+-----------+-----------+-------+
| Anders | 1 | 26 | 0 | 2 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Armaan Bhullar | 1 | 50 | 1 | 3 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Biranchi | 1 | 3 | 0 | 1 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Madison May | 1 | 50 | 0 | 3 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Mathieu Rene <[email protected]> | 1 | 6 | 2 | 2 |
+------------------------------------------------+---------+-----------+-----------+-------+
| Max Woolf <[email protected]> | 1 | 1 | 1 | 1 |
+------------------------------------------------+---------+-----------+-----------+-------+
| Memo Akten | 1 | 17 | 9 | 3 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| N Shepperd | 1 | 0 | 0 | 0 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Santosh Heigrujam | 1 | 123 | 0 | 2 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| Svilen Todorov | 1 | 1 | 0 | 1 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
| stephan orlowsky | 1 | 6 | 0 | 1 |
| <[email protected]> | | | | |
+------------------------------------------------+---------+-----------+-----------+-------+
To sort by number of commits, then by number of files
$ gitstats -sort-by=commits,files
go get -v -u github.com/heisantosh/gitstats