Skip to content

Instantly share code, notes, and snippets.

@smuuf
Created September 28, 2016 07:26
Embed
What would you like to do?
# Echo number of GIT commits per year.
git log --pretty='format:%cd' --date=format:'%Y' | uniq -c | awk '{print "Year: "$2", commits: "$1}'
@olleharstedt
Copy link

Does this include all branches or only the master/default branch?

@pmaruszczyk
Copy link

@olleharstedt It seems this refers to branch which you have checkouted.

@olleharstedt
Copy link

@lordt Yes. I've added --all to include all branches. Thank you.

@smuuf
Copy link
Author

smuuf commented Mar 28, 2020

Heh, nice to see this is useful to someone else, too. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment