git代码量统计工具 -- 2017-12-20
1. 按时间范围统计用户提交代码行数
自2017-01-01号以来的代码提交行数:
git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --since='2017-01-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 }' -; done
2. 按时间范围统计用户提交次数
自2017-01-01号以来的提交次数:
git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --no-merges --since='2017-01-01' | grep -e 'commit [a-zA-Z0-9]*' | wc -l;done
可以参考文章:http://blog.csdn.net/maosidiaoxian/article/details/24401103,将上面的命令添加到命令行
相关推荐
formula 2020-11-12
huhongfei 2020-11-05
乾坤一碼農 2020-10-27
liumengyanysu 2020-10-22
E哥的aws认证攻略 2020-10-15
guying 2020-10-05
好脑筋不如烂笔头 2020-09-17
baolen 2020-08-15
Equation 2020-08-09
Balmunc 2020-08-02
fenggou 2020-07-18
zhangxing 2020-07-05
loganwz 2020-07-05
tianyafengxin 2020-10-08
nebulali 2020-09-11