I would like to view a summary of my total number of commits and total number of lines of code which I have committed to a particular repository on GitHub. Is there any way to do this using either: GitHub, Git Shell on Windows, or another tool which easily works on Windows or in a web browser?
Here is my current strategy:
Commits
Lines of Code
git log --author="myemail" --oneline --shortstat > gitstat.log
Surely there must be a more convenient way of doing this? Note: I am looking for an answer that does not require bash, and is easily accessible to Windows users.
On GitHub’s repo summary bar, click the contributor count:
The contributor list includes number of commits, lines added, and lines deleted for each person.
Alternatively, to count commits with just the Git CLI, you can use git shortlog --summary
:
~/src/linguist $ git shortlog --summary --numbered --no-merges
607 Joshua Peek
568 Arfon Smith
321 Paul Chaignon
245 Ted Nyman
132 Brandon Keepers
131 Adam Roben
81 Alhadis
80 Lars Brinkhoff
⋮
This doesn’t have GitHub’s advantage of grouping multiple name/e-mail combos belonging to the same user, mind.