Skip to content

Instantly share code, notes, and snippets.

@gregorriegler
Forked from sephiroth74/git pretty stat
Created August 10, 2020 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregorriegler/75391c56258f1ea922961579d1ceeb0c to your computer and use it in GitHub Desktop.
Save gregorriegler/75391c56258f1ea922961579d1ceeb0c to your computer and use it in GitHub Desktop.
Show lines added/deleted and total commits per author in a period of time on all branches
git log --all --numstat --pretty="%H" --author="author" --since=1.year | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d\nlines deleted: -%d\ntotal commits: %d\n", plus, minus, total)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment