git shortlog
git shortlog is git log grouped by author. It's the single fastest way to answer "who has been working on this repo, and what did they do?" — useful for release notes, monthly contributor reports, and onboarding to a new codebase.
The default form
git shortlog
Output — commits grouped per author, subject only
Alice (12):
Add login form validation
Tighten password rules
Add validation helper
Fix logout redirect
...
Bob (3):
Update README
Fix typo in CONTRIBUTING
Bump dependency versionsNote that by default git shortlog reads from stdin if there is one — but on most terminals it just runs against HEAD. If it appears to hang, you piped nothing into it; press Ctrl+D or give it explicit arguments.
Counting commits per author
git shortlog -s # summary mode — counts only git shortlog -sn # also sorted by count, descending git shortlog -sne # include the author's email
git shortlog -sne
47 Alice <alice@example.com>
12 Bob <bob@example.com>
3 release-bot <bot@example.com>
1 Alice <alice@home.com>Restricting the range
git shortlog -sn --since="1 month ago" git shortlog -sn --since="2026-01-01" --until="2026-03-31" # Between two releases — typical release-notes use case git shortlog v1.0..v2.0 git shortlog -sn v1.0..v2.0 # Only commits on main since branching git shortlog -sn main..feature
Filtering out merge commits
git shortlog -sn --no-merges # Useful for honest contribution counts — merge commits don't # represent real work.
Custom formatting
Per-commit format inside each author group
git shortlog --format="* %s (%h)"
Per-author, ready-to-paste release notes
Alice (3):
* Add login form validation (1f9ab2c)
* Tighten password rules (b3a9f00)
* Add validation helper (5a2c7e3)
Bob (1):
* Update README (c204c1d)Group by email or committer
git shortlog -sn --group=author # default git shortlog -sn --group=committer # who actually pushed git shortlog -sn --group=trailer:Co-authored-by # honour Co-authored-by trailers # Combine multiple groupings git shortlog -sn \ --group=author \ --group=trailer:Co-authored-by
The trailer: form is gold for teams that pair-program — it gives credit to anyone listed in a Co-authored-by: line of a commit message.
Use cases
Release notes —
git shortlog --no-merges --format="* %s" v1.0..v2.0gives you a Markdown-ish bullet list per author.Monthly contributor reports —
git shortlog -sn --since="1 month ago"for management.New-repo orientation —
git shortlog -sn | headtells you who to ask about most of the code.Detecting bus factor — if one author has 95% of commits, that's a risk indicator.
OSS recognition —
git shortlog -sne v1.0..v2.0produces the "thanks to these contributors" block many open-source projects ship.
Combining with other shell tools
Top 10 contributors of the year
git shortlog -sn --since="1 year ago" --no-merges | head -10
Total commits by everyone in the last quarter
git shortlog -sn --since="3 months ago" \
| awk '{sum += $1} END {print sum, "commits total"}'Authors who committed but didn't merge anything
comm -23 \
<(git shortlog -sn --no-merges | awk '{$1=""; print substr($0,2)}' | sort) \
<(git shortlog -sn --merges | awk '{$1=""; print substr($0,2)}' | sort)Email-only list for sending release thank-you notes
git shortlog -sne v1.0..v2.0 \ | sed -E 's/.*<(.+)>.*/\1/' \ | sort -u
Reading from another log
Pipe any git log output into shortlog
# Custom revision range piped in git log --no-merges --since="1 week ago" | git shortlog git log feature-x | git shortlog -sn
git config --global alias.who "shortlog -sne --no-merges". Then `git who --since="1 month ago"` produces a clean monthly contributor report you can paste into a status update.