所有分支上每位作者的 Git 提交次数 [英] Git number of commits per author on all branches

查看:20
本文介绍了所有分支上每位作者的 Git 提交次数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得所有分支上每位作者的提交次数.我看到了

I'd like to get the number of commits per author on all branches. I see that

git shortlog -s -n

打印一个非常好的列表,但它不计算尚未从其他分支合并的提交.如果在每个分支上迭代这个命令,那么显然常见的提交会被多次计算.你能给我一个脚本/命令来让我了解整体情况吗?

Prints a very nice list but it is not counting the commits that are not yet merged from other branches. If iterate this command over every branch then obviously the common commits get counted multiple times. Could you give me a script/command that would yield me the overall picture?

推荐答案

git shortlog -s -n --all --no-merges

将为您提供所有分支机构的统计数据.

Will give you statistics for all branches.

EDIT:添加了 --no-merges 以从合并提交中排除统计信息.

EDIT: Added --no-merges to exclude statistics from merge commits.

这篇关于所有分支上每位作者的 Git 提交次数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆