Skip to content

Instantly share code, notes, and snippets.

@garraflavatra
Created December 29, 2021 10:19
Show Gist options
  • Save garraflavatra/6405b357a043bc59387884f3b4f6b52d to your computer and use it in GitHub Desktop.
Save garraflavatra/6405b357a043bc59387884f3b4f6b52d to your computer and use it in GitHub Desktop.
Git: how many lines did a user change? Modified https://gist.github.com/Xeoncross/4020489#gistcomment-3989215
git log --shortstat --author "Romein van Buren" \
| egrep "file[s] changed" \
| sed 's/changed, \([0-9]\+ deletions\)/changed, 0 insertions(+), \1/g' \
| awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed:", files, "- lines inserted:", inserted, "- lines deleted:", deleted}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment