Skip to content

Instantly share code, notes, and snippets.

@larsroettig
Created November 3, 2017 19:36
Show Gist options
  • Save larsroettig/6e3d0fce912bb94be76be7503f8db35b to your computer and use it in GitHub Desktop.
Save larsroettig/6e3d0fce912bb94be76be7503f8db35b to your computer and use it in GitHub Desktop.
git log --shortstat --author="Your Name" | grep -E "fil(e|es) changed" | awk '{files+=$1; inserted+=$4; deleted+=$6; delta+=$4-$6; ratio=deleted/inserted} END {printf "Commit stats:\n- Files changed (total).. %s\n- Lines added (total).... %s\n- Lines deleted (total).. %s\n- Total lines (delta).... %s\n- Add./Del. ratio (1:n).. 1 : %s\n", files, inserted, deleted, delta, ratio }' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment