Skip to content

Instantly share code, notes, and snippets.

@PuercoPop
Created March 30, 2012 14:14
Show Gist options
  • Save PuercoPop/2251798 to your computer and use it in GitHub Desktop.
Save PuercoPop/2251798 to your computer and use it in GitHub Desktop.
Presents an aggregated count of the 'blame' of each contributor to a git repository
#!/bin/sh
#
# Execute in the repo root dir
#
git ls-tree -r HEAD | awk '{print $4}' | tr -s '\n' ' ' | xargs -n 1 git blame| awk '{print $1,$2,$3,$4,$5,$6,$7}' | gsed -r 's/.*\((.*?) [0-9]{4}-[0-9]{2}-[0-9]{2} .*/\1/p' | sort | uniq -c | sort -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment