Git shortlog

The git shortlog command provides a summary of the Git log. It is particularly helpful if you are only interested in a short summary. The command groups commits by author, making it easy to see who worked on what.



Tutorials dojo strip

Initial Example

$ git shortlog




SHORTLOG Options

OptionDescription
-nLimits the number of commit lines to be displayed per author.
-s, --summaryDisplays only a summary of commit counts per author, without individual commit messages.
--numberedEquivalent to -n, limits the number of commit lines per author.
--allIncludes all commits from all branches.
--no-mergesOmits merge commits from the output.
--authorFilters commits by a specific author. Example: --author="Author Name".
<since>..<until>Displays commits within a specific range. Example: v1.0.0..v2.0.0.




Examples

1. Basic Shortlog

Shows a summary of commits grouped by author.

$ git shortlog

2. Shortlog with a Specific Number of Lines per Commit

Limits the number of commit lines to be displayed.

$ git shortlog -n

3. Shortlog with Sorting by Number of Commits

Sorts the output by the number of commits per author.

$ git shortlog -n -s

4. Shortlog with Commits Filtered by a Specific Author

Shows only the commits by a specific author.

$ git shortlog --author="Author Name"

5. Shortlog with a Specific Commit Range

Displays commits within a specific range.

$ git shortlog <since>..<until>

Replace <since> and <until> with the desired commit range.

Scroll to Top