Skip to main content
Back to command reference
Inspecting History

git shortlog

Summarize commit history grouped by author

Practical example

bash
git shortlog -sn                # count of commits per author
git shortlog -sn v1.0.0..HEAD  # changes since v1.0.0
git shortlog -e                # include email addresses

Command overview & how it works

Groups commits by author name and displays the commit count and message for each author. This is the standard command for generating changelogs and release notes. Use git shortlog -sn for a summary with commit counts only, sorted by number of commits (descending). Use git shortlog -e to include email addresses, and git shortlog --since="2026-01-01" to filter by date range. For release notes, use git shortlog <previous-tag>..HEAD to see all commits since the last release. Use git shortlog --no-merges to exclude merge commits from the summary. This command is commonly used in release automation scripts to generate human-readable changelogs.

Chapter 08 · History & Diff Mastery

Master Git log, diff, and blame offline

Read advanced graph traversals, patch analysis, and investigation workflows in the 97-page offline course — ₹499.

Learn more

Practical tips

  • Use git shortlog -sn to rank contributors by commit count for release notes or contribution reports.
  • Generate a changelog for a release with git shortlog -sn <previous-tag>..HEAD.
  • Add -e to include email addresses and --no-merges to exclude merge commits from the summary.

Deep-dive guides & tutorials

In-depth walkthroughs and practical scenarios related to git shortlog

All guides →

Related commands

More from Inspecting History