Examples
To view a list of users and their commit count:
git shortlog -s -n --all --no-mergesgit shortlog summarizes the output from git log, grouping each commit by user:
anotheruser (1):
Fix bug
ninest (5):
First commit
Second commit
Update README
Add contributors
PublishOptions
--numbered, -n
Sort by number of commits per user: git shortlog -n:
ninest (5):
First commit
Second commit
Update README
Add contributors
Publish
anotheruser (1):
Fix bug--summary -s
Only provide the commit count of each user: git shortlog -s:
1 anotheruser
5 ninestView more options on the documentation for git shortlog.
Breakdown of commits per user
Use the command
git shortlog -s -n --all --no-merges--no-merges ensures that merge commits are not counted.
The output of the command looks like
5 ninest
1 anotheruser