Skip to content

Instantly share code, notes, and snippets.

@windworst
Created October 6, 2018 14:41
Show Gist options
  • Save windworst/35319a073fd934673b8e34e7b4051b81 to your computer and use it in GitHub Desktop.
Save windworst/35319a073fd934673b8e34e7b4051b81 to your computer and use it in GitHub Desktop.
[git count] #Shell #Git
# 格式化输出 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