查看Git提交的代码统计

1,提交Top5:

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


2,某用户提交的代码统计

git log --author="$(git config --get user.name)" --pretty=tformat: --numstat | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' 

3,eg:

 

 

posted @ 2019-09-30 14:20  下午喝什么茶  阅读(2961)  评论(0编辑  收藏  举报