Skip to content

Instantly share code, notes, and snippets.

@doublenns
Last active February 12, 2021 20:04
Show Gist options
  • Save doublenns/6953b21c7a5286ef78ab0ccb30cbaffb to your computer and use it in GitHub Desktop.
Save doublenns/6953b21c7a5286ef78ab0ccb30cbaffb to your computer and use it in GitHub Desktop.
Git Repo Statistics
# Local branches merged, or not merged, into master
git branch --merged master
git branch --no-merged master
# Number of commits contributed per author
git shortlog -s -n
# Number of lines contributed per author
# Location within repo executed matters
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 --reverse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment