Git shortlog: contribution summary
git shortlog summarizes the commit history by author. Ideal for seeing who does what, counting contributions, and generating changelogs.
What is git shortlog?
git shortlog groups commits by author and displays a clear summary of contributions. It is git log but organized by person.
It is like a dashboard: at a glance, you see who contributed what. Very useful in code review, project management, or for generating release notes.
Git shortlog syntax
git shortlogCommits grouped by author
git shortlog -snCommit count by author (sorted)
git shortlog v1.0..v2.0Contributions between two tags
Git shortlog in practice
Contribution summary and counting.
Summary by author
Counting and filtering
Essential shortlog commands
git shortlog -snRanking by commit count
git shortlog -sneWith email addresses
git shortlog --since="date"Filter from a date
git shortlog tag1..tag2Between two versions
git shortlog --no-mergesExclude merge commits
git shortlog --group=trailer:keyGroup by commit trailer
Common mistakes with git shortlog
Duplicate author entries
The same author with different names/emails appears multiple times. Create a .mailmap file to merge identities.
Forgetting to exclude merges
Merge commits inflate the stats. Add --no-merges for figures more representative of actual work.
Judging contribution by commit count
The number of commits does not reflect the quality or amount of work. A major refactoring can be a single commit while typo fixes can produce ten.
Part of the Git History, Search & Debug guide
GitQuest is created by Anaïs (nouvelle fenêtre), web developer and head of education, specializing in tech training and digital accessibility.
Questions about git shortlog
Understand contributions with GitQuest
Learn to analyze your team's history and generate changelogs.
Start the investigations