Git统计每个人提交的Commit次数和代码行数

提交次git shortlog --numbered --summary
查看所有的commit数git log --oneline | wc -l
提交删除行数git log --author="$(git config --get user.name)" --pretty=tformat: --numstat | awk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }'
使用cloc统计代码行数给力:
安装brew install cloc
统计目录下的所有文件,代码行数cloc ./
排除文件夹cloc ./ --exclude-dir=Pods,Tests,Utility