Skip to content
Latchkey

git shortlog: Usage, Options & Common CI Errors

git shortlog groups commit subjects by author - the fast way to build contributor lists and changelogs.

shortlog is git log shaped for release notes. Pair it with a range and a mailmap for clean output.

What it does

git shortlog summarizes git log output by author, listing each author and the subject lines of their commits, optionally counting instead of listing.

Common usage

Terminal
git shortlog -sn              # authors by commit count
git shortlog v1.0.0..HEAD     # commits since a tag
git shortlog -sne             # include emails
git log --no-merges | git shortlog

Options

FlagWhat it does
-s / --summaryShow counts, not commit subjects
-n / --numberedSort by number of commits
-e / --emailShow author email
--no-mergesExclude merge commits
<range>Limit to a commit range

Common errors in CI

shortlog reads from a tty or piped log; in non-interactive CI pass an explicit range or pipe git log into it, otherwise it may wait for input. Authors split across multiple emails group separately - add a .mailmap to consolidate them.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →