Thursday, 27 December 2018

GIT: git shortlog for release announcements

The git shortlog command summarizes the git log output. It groups all commits by author and includes the first line of the commit message.
The -s option suppresses the commit message and provides a commit count. The -n option sorts the output based on the number of commits by author.
# gives a summary of the changes by author
git shortlog

# compressed summary
# -s summary, provides a commit count summary only
# -n sorted by number instead of name of the author
git shortlog -sn
This command also allows you to see the commits done by a certain author or committer.
# see the commits by the author "Lars Vogel"
git shortlog --author="Lars Vogel"

# see the commits by the author "Lars Vogel"
# restricted by the last years
git shortlog --author="Lars Vogel" --since=2years

# see the number of commits by the author "Lars Vogel"
git shortlog -s --author="Lars Vogel" --since=2years

0 comments:

Post a Comment