Created
August 12, 2020 06:44
-
-
Save nikgalushko/f15a645c438c38c313cfad3618454328 to your computer and use it in GitHub Desktop.
git-stats
This file contains hidden or 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
for name in $(git log --pretty="%ae%n%cn" | sort | uniq); do | |
git log \ | |
--author "$name" \ | |
--pretty=tformat: --numstat | | |
awk -v name="$name" '{ | |
add += $1; subs += $2; loc += $1 - $2 | |
} END { | |
if (loc != 0) | |
printf "[%s] Lines: +\033[32m%s\033[0m -\033[31m%s\033[0m; Total: %s\n", name, add, subs, loc | |
}' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment