查看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: