Created
October 6, 2018 14:41
-
-
Save windworst/35319a073fd934673b8e34e7b4051b81 to your computer and use it in GitHub Desktop.
[git count] #Shell #Git
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
# 格式化输出 log | |
git config --global alias.log-format '!git log --pretty=tformat: --numstat' | |
# 统计格式化输出的内容 | |
git config --global alias.count '!awk "{ add += \$1 ; subs += \$2 ; loc += \$1 - \$2 } END { printf \"\033[31m+\033[0m:%s \033[32m-\033[0m:%s \033[33m△\033[0m:%s\n\",add,subs,loc }"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment