Last Updated: February 25, 2016
·
937
· vierbergenlars

Git commit stats

For the people loving statistics on commit messages

Top-30 commit messages (first line)

git log --pretty=format:%s | sort | uniq -c | sort -n | tac | head -30

Most common first words in commit messages

git log --pretty=format:%s | cut -d " " -f 1 | sort | uniq -c | sort -n | tac  | head -30

Top all-time committers

git log --pretty=format:%an | sort | uniq -c | sort -n | tac | head -30

Time most often committed

git log --pretty=format:%aD|cut -d " " -f 5|cut -d ":" -f 1|sort|uniq -c|sort -n|tac # hour
git log --pretty=format:%aD|cut -d " " -f 1|sort|uniq -c|sort -n|tac # weekday
git log --pretty=format:%aD|cut -d " " -f 1,5|cut -d ":" -f 1|sort|uniq -c|sort -n|tac | head -20 # weekday & hour