GIT - 推送/编写了大多数代码

时间:2011-02-22 01:31:08

标签: git github

是否有一个git命令来检查哪个开发人员推送了所有历史记录的最多代码?

5 个答案:

答案 0 :(得分:7)

我发现了一些东西,

git ls-files | xargs -n1 -d'\n' -i git-blame {} | perl -n -e '/\s\((.*?)\s[0-9]{4}/ && print "$1\n"' | sort -f | uniq -c -w3 | sort -r
User: askedrelic
Functions: perl sort uniq xargs
  

打印GIT存储库的每位作者的每行贡献

     

计算出每个作者对整个GIT回购的总线贡献。包含二进制文件,这会弄乱真正的数量。

     

如果崩溃或花费的时间太长,请在开头处弄乱ls-file选项:

     

git ls-files -x "*pdf" -x "*psd" -x "*tif" to remove really random binary files

     

git ls-files "*.py" "*.html" "*.css" to only include specific file types

     

基于我原来的SVN版本:http://www.commandlinefu.com/commands/view/2787/prints-total-line-count-contribution-per-user-for-an-svn-repository

http://www.commandlinefu.com/commands/view/3889/prints-per-line-contribution-per-author-for-a-git-repository

答案 1 :(得分:3)

LWN使用名为"Who wrote 2.6.x"

的工具发布Linux内核的gitdm报告

我在其他项目上也取得了一些成功,如果你想根据雇主比较不同开发人员群体的贡献,它会特别有用。

答案 2 :(得分:2)

Github提供影响图。例如,here's the graph for comex/frash

答案 3 :(得分:2)

如果您使用的是Windows并使用TortoiseGit,则可以选择显示日志作为回购。在即将出现的对话框中,选择统计tortoisegit_screenshot

现在,您可以从右上角的下拉框中选择原始统计按作者提交按日期提交

enter image description here

答案 4 :(得分:1)

正如我在Determine current code distribution by author中提到的,您可以使用gitdm轻松生成统计信息。