Skip to content

Instantly share code, notes, and snippets.

@tibbon
Created May 1, 2012 15:56
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 tibbon/2569089 to your computer and use it in GitHub Desktop.
Save tibbon/2569089 to your computer and use it in GitHub Desktop.
Git Repo Statistics commands
git log --shortstat | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'
git log --shortstat --author "David Fisher" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'
git log --pretty=format:%an | awk '{ ++c[$0]; } END { for(cc in c) printf "%5d %s\n",c[cc],cc; }'| sort -r
git shortlog -sn --no-merges
git log --graph --full-history --all --color \
--pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment