Git 统计脚本

统计行数:

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 }' -

统计提交(前10个):

git log --since=201605-20 --until=2017-05-20 --pretty='%aN' | sort | uniq -c | sort -k1 -n -r | head -n 10
git log --since=2015–10-10 --until=2017-05-20 --oneline | wc -l 

--since表示起始时间, --until表示结束时间。

猜你喜欢

转载自blog.csdn.net/u012515223/article/details/77126716
今日推荐