Skip to content

Instantly share code, notes, and snippets.

@codatory
Created August 2, 2013 14:32
Show Gist options
  • Select an option

  • Save codatory/6140314 to your computer and use it in GitHub Desktop.

Select an option

Save codatory/6140314 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment