Inspecting History
git shortlog
Summarize commit history grouped by author
Practical Example
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.
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.