Skip to content

Instantly share code, notes, and snippets.

What would you like to do?

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