赞
踩
辛辛苦苦撸了一堆代码,如何统计呢?
在本地git工程目录下,输入如下命令:
git log --format='%aN' | sort -u | while read name; do echo -en "$name\t"; git log --author="$name" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s ", add, subs, loc }' -; done
结果如下:
使用超级简单,添加目录,设置识别文件类型,就可以了。超级简单,就不说了。
参考这个链接:《SourceCount代码统计工具使用》
下载地址:http://ttl7.pc6.com/lff/SourceCounter.zip
若对你有帮助,欢迎点赞、收藏、评论,你的支持就是我的最大动力!!!
同时,阿超为大家准备了丰富的学习资料,欢迎关注公众号“超哥学编程”,即可领取。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。