Created
August 16, 2011 10:49
-
-
Save dameninngenn/1148840 to your computer and use it in GitHub Desktop.
git log sum example
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 --stat --author=dameninngenn --since="2011-07-15" --before="2011-08-15" --no-merges | grep 'files changed' | awk '{ins += $4}{del += $6} END{print "total: "ins"insertions(+) "del"deletions(-)"}' | |
> total: 3385insertions(+) 1089deletions(-) |
Thank you for your opinion.
It seems great! Thanks!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bonus:
per authors in all branches
git log --all --since="11 days ago" --no-merges --pretty=format:%an | sort | uniq | xargs -I% -L1 bash -c 'echo $0; git log --all --stat --author="$0" --since="11 days ago" --no-merges | grep "files changed" | sed -E "s/d, ([[:digit:]]+) d/d, 0 insertions(+), \1 d/g" | awk '\''{ins += $4}{del += $6} END{print "total: "ins"insertions(+) "del"deletions(-)"}'\'';' "%"
Example output: