Skip to content

Instantly share code, notes, and snippets.

@codatory
Created August 2, 2013 14:33
Show Gist options
  • Save codatory/6140316 to your computer and use it in GitHub Desktop.
Save codatory/6140316 to your computer and use it in GitHub Desktop.
"One Liner" to list code ownership of a Rails project tracked with Git. Change the filetypes for other projects.
git ls-tree --name-only -r HEAD | egrep -i '\.(scss|css|js|coffee|rb|html|haml|erb|rake)$' | egrep -v '^vendor' | xargs -o -n1 git blame --line-porcelain | grep "^author " | sed 's/author //' | sort | uniq -c | sort -nr
@codatory
Copy link
Author

codatory commented Aug 2, 2013

This is really closely based on http://stackoverflow.com/a/13687302/406870

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