Created
January 20, 2012 18:45
-
-
Save travist/1648952 to your computer and use it in GitHub Desktop.
Determine how productive your team has been using git history.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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