Created
September 28, 2016 07:26
-
-
Save smuuf/0d5746c4e734c51fe0de3559d02cb852 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Echo number of GIT commits per year. | |
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}' |
Heh, nice to see this is useful to someone else, too. :)
Adding a sort in between ensures that all the years appear only once in the final result.
git log --pretty='format:%cd' --date=format:'%Y' | sort | uniq -c
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@lordt Yes. I've added
--all
to include all branches. Thank you.