Skip to content

Instantly share code, notes, and snippets.

@madbook
Created September 17, 2013 17:47
Show Gist options
  • Save madbook/6597929 to your computer and use it in GitHub Desktop.
Save madbook/6597929 to your computer and use it in GitHub Desktop.
gives you a line count per author, can take a while depending on size of project. modify (php|js|html|css) with whatever file extensions you want to check.
git ls-tree --name-only -r -z HEAD | egrep -z -Z -E '\.(php|js|html|css)$' | xargs -0 -n1 git blame --line-porcelain | grep "^author " | sort | uniq -c | sort -nr
@madbook
Copy link
Author

madbook commented Sep 17, 2013

if you get an error, check if your version of git supports git blame --line-porcelain

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