Gitgit shortlog

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

Bash
git shortlog

Output — commits grouped per author, subject only

Text
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 versions

Note 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

Bash
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

Text
    47  Alice <alice@example.com>
    12  Bob <bob@example.com>
     3  release-bot <bot@example.com>
     1  Alice <alice@home.com>
Same person, different emails
Notice Alice appears twice — once with her work email, once with a personal one. Add a `.mailmap` file at the repo root to merge them. Format: `Canonical Name <canonical@email> <old@email>`. Git uses it automatically.
Restricting the range

Bash
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

Bash
git shortlog -sn --no-merges
# Useful for honest contribution counts — merge commits don&apos;t
# represent real work.
Custom formatting

Per-commit format inside each author group

Bash
git shortlog --format="* %s (%h)"

Per-author, ready-to-paste release notes

Text
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

Bash
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 notesgit shortlog --no-merges --format=&quot;* %s&quot; v1.0..v2.0 gives you a Markdown-ish bullet list per author.

  • Monthly contributor reportsgit shortlog -sn --since=&quot;1 month ago&quot; for management.

  • New-repo orientationgit shortlog -sn | head tells 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 recognitiongit shortlog -sne v1.0..v2.0 produces the "thanks to these contributors" block many open-source projects ship.

Combining with other shell tools

Top 10 contributors of the year

Bash
git shortlog -sn --since="1 year ago" --no-merges | head -10

Total commits by everyone in the last quarter

Bash
git shortlog -sn --since="3 months ago" \
  | awk &apos;{sum += $1} END {print sum, "commits total"}&apos;

Authors who committed but didn't merge anything

Bash
comm -23 \
  <(git shortlog -sn --no-merges | awk &apos;{$1=""; print substr($0,2)}&apos; | sort) \
  <(git shortlog -sn --merges    | awk &apos;{$1=""; print substr($0,2)}&apos; | sort)

Email-only list for sending release thank-you notes

Bash
git shortlog -sne v1.0..v2.0 \
  | sed -E &apos;s/.*&lt;(.+)&gt;.*/\1/&apos; \
  | sort -u
Reading from another log

Pipe any git log output into shortlog

Bash
# Custom revision range piped in
git log --no-merges --since="1 week ago" | git shortlog
git log feature-x | git shortlog -sn
shortlog reads stdin happily
Anything that looks like `git log` output can be piped in. This is why `git log ... | git shortlog` works — `shortlog` is just a formatter that groups by author/subject.
Tip
Add to your config so monthly summaries are one keystroke:
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.