Skip to content

Instantly share code, notes, and snippets.

@ykarikos
Created April 17, 2012 10:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ykarikos/2405068 to your computer and use it in GitHub Desktop.
Save ykarikos/2405068 to your computer and use it in GitHub Desktop.
Git log analysis
# List amount of commits in git repository per month and author
git log --pretty='format:%ad %ae' --date=short | sed 's/@.*//'| cut -b -7,11- |sort |uniq -c |awk '{ printf "%s %30s ", $2, $3; count=int($1/2); for(i=0; i<count; i++) { printf "*" } printf "\n"; }'
# List amount of commits on different times of day
git log --pretty='format:%ad' --date=iso | cut -b 12-13|sort |uniq -c|awk '{ printf "%s %30s ", $2, $3; count=int($1/2); for(i=0; i<count; i++) { printf "*" } printf "\n"; }'
# Find inhumane commit times
git log --pretty='format:%ad %ae %s' --date=iso | egrep -v "^2012-[0-9-]* ([12]|0[7-9])"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment