Skip to content

Instantly share code, notes, and snippets.

@alexpchin
Created February 15, 2018 00:45
Show Gist options
  • Save alexpchin/f345860a65b6fe409751cb657f894582 to your computer and use it in GitHub Desktop.
Save alexpchin/f345860a65b6fe409751cb657f894582 to your computer and use it in GitHub Desktop.

Number of lines in a repo:

git ls-files | xargs wc -l

Breakdown of lines in a repo by contributor:

git ls-files | while read f; do git blame -w -M -C -C --line-porcelain "$f" | grep -I '^author '; done | sort -f | uniq -ic | sort -n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment