Git number of commits per author on all branches

GitVersion ControlCommit

Git Problem Overview


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?

Git Solutions


Solution 1 - Git

git shortlog -s -n --all --no-merges

Will give you statistics for all branches.

EDIT: Added --no-merges to exclude statistics from merge commits.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionjabalView Question on Stackoverflow
Solution 1 - GitralphtheninjaView Answer on Stackoverflow