Skip to content

Instantly share code, notes, and snippets.

@sanmai
Forked from amitchhajer/Count Code lines
Created October 5, 2020 05:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sanmai/88a38d5d3db49f66442fabbd626005ea to your computer and use it in GitHub Desktop.
Save sanmai/88a38d5d3db49f66442fabbd626005ea to your computer and use it in GitHub Desktop.
Count number of code lines in git repository per user
git ls-files | xargs -n1 git blame --line-porcelain | sed -n 's/^author //p' | sort -f | uniq -ic | sort -nr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment