GIT - 谁 push/编写了最多的代码

标签 git github

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

最佳答案

我发现了一些东西,

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

Prints per-line contribution per author for a GIT repository

Figures out total line contribution per author for an entire GIT repo. Includes binary files, which kind of mess up the true count.

If crashes or takes too long, mess with the ls-file option at the start:

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

Based off my original SVN version: 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

关于GIT - 谁 push/编写了最多的代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5073148/

相关文章:

git - 分支 rebase 后查找上一个 fork 点

Git 不改变工作目录

Git子模块初始化异步

java - 如何使用 java 连接到我公司的 git hub 门户?

git - 无法使用 ssh 进行 git 克隆、推送、 pull ,引发 kex_exchange_identification 错误

git - 我可以将另一个 git 用户视为远程用户吗?

git rebase : fixup commits but use latest message

个人 github 页面上的数据库

r - 在 GitHub 上保存旧 R 包版本的好策略是什么?

git - 如何获取其他人的 pull 请求(修复它)