I'd like to get the number of commits per author on all branches. I see that
git shortlog -s -n
Prints a very nice list but it is not counting the commits that are not yet merged from other branches. If iterate this command over every branch then obviously the common commits get counted multiple times. Could you give me a script/command that would yield me the overall picture?
To get the number of commits for each user execute git shortlog -sn --all. To get the number of lines added and delete by a specific user install q and then execute: git log --author="authorsname" --format=tformat: --numstat | q -t "select sum(c1), sum(c2) from -"
On GitHub.com, you can access your project history by selecting the commit button from the code tab on your project. Locally, you can use git log . The git log command enables you to display a list of all of the commits on your current branch. By default, the git log command presents a lot of information all at once.
git shortlog -s -n --all --no-merges
Will give you statistics for all branches.
EDIT: Added --no-merges
to exclude statistics from merge commits.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With