mac OS X下git代码行统计命令

1、统计某人的代码提交量,包括增加,删除

git log --author="$(git config --get user.name)" --since=2014-07-01 --until=2016-08-01 --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 }'

2、仓库提交者排名前5(如果看全部,去掉head管道即可)

git log --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 5

 

posted @ 2016-08-01 10:03  枫本非凡  阅读(993)  评论(0编辑  收藏  举报