Summarize git log output by author.
The git shortlog command summarizes the git log output in a format suitable for inclusion in release announcements. It groups commits by author and displays the commit subjects under each author name.
This command is particularly useful for generating changelogs and understanding the contribution breakdown of a project. When used with the -s flag, it shows only the commit count per author, providing a quick overview of who contributed what.
shortlog can read from standard input, allowing it to be piped from git log with custom revision ranges and formatting options, making it flexible for various reporting needs.
| Name | Description | Optional |
|---|---|---|
-s |
Suppress commit description and provide a commit count summary only. | Yes |
-n |
Sort output by number of commits per author instead of alphabetically. | Yes |
-e |
Show the email address of each author. | Yes |
revision range |
Show only commits in the specified revision range. | Yes |
git shortlog
git shortlog -sn
git shortlog -sne --since='1 year ago'
git log --no-merges | git shortlog -sn