0
如何计算每个贡献者在资源库中编写的字数?计算每个贡献者的字数
如何计算每个贡献者在资源库中编写的字数?计算每个贡献者的字数
最好在GitHub的本地克隆上解决,以便分析git日志并检查每个贡献者。
请参阅 “getting contributor stats” 的基础上:
git log --author="Jared Barboza" --pretty=tformat: --numstat | \
grep -v public/javascripts/jquery | \
gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END \
{ printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }' -
不过,这是行添加/对于给定的贡献者删除。
可以结合在’Quantifying the amount of change in a git diff?”中描述的一个类似的方法。
或者你可以使用专门的程序,如git-wordcount。
通过尝试对它们进行计数,然后在此处询问何时出现具体问题?你有什么问题? – Blender 2013-02-08 20:16:19
提交数量?添加的行数? – ogzd 2013-02-08 20:19:28