Skip to content

Instantly share code, notes, and snippets.

@travist
Created January 20, 2012 18:45
Show Gist options
  • Save travist/1648952 to your computer and use it in GitHub Desktop.
Save travist/1648952 to your computer and use it in GitHub Desktop.
Determine how productive your team has been using git history.
git log --shortstat --since="1 year ago" --until="now" \
| grep "files changed\|Author\|Merge:" \
| awk '{ \
if ($1 == "Author:") {\
currentUser = $2;\
}\
if ($2 == "files") {\
files[currentUser]+=$1;\
inserted[currentUser]+=$4;\
deleted[currentUser]+=$6;\
}\
} END {\
for (i in files) {\
print i ":", "files changed:", files[i], "lines inserted:", inserted[i], "lines deleted:", deleted[i];\
}\
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment