Created
July 31, 2013 02:08
-
-
Save brentsowers1/6118765 to your computer and use it in GitHub Desktop.
Script to show lines attributed to each author
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get all current files in your repo of the extensions that you want to be considered code | |
# (.scala and .js for my example) | |
git ls-files | egrep "\.(scala|js)$" > files.txt | |
# Now edit files.txt to remove files that you don't want counted, like jQuery extensions | |
cat files.txt | xargs -n1 git blame -w | ruby -n -e '$_ =~ /^.*\((.*?)\s[\d]{4}/; puts $1.strip' | sort -f | uniq -c | sort -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment