Skip to content

Instantly share code, notes, and snippets.

@keenhenry
Forked from amitchhajer/Count Code lines
Created February 12, 2019 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keenhenry/9970de29a60626c18a0e4863116e7aff to your computer and use it in GitHub Desktop.
Save keenhenry/9970de29a60626c18a0e4863116e7aff to your computer and use it in GitHub Desktop.
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment