使用gitlog时,如何按用户进行筛选,以便只看到该用户的提交?


当前回答

cat | git log --author="authorName" > author_commits_details.txt

这将以文本格式提供提交。

其他回答

由于另一个问题被锁定(可能是错误的),我将把这个放在这里:

显示作者及其提交次数:

git shortlog -nse

查找特定USERNAME的所有提交:

git log --author=USERNAME --oneline --color=never | awk '{print $1}' | xargs git show

在github上还有一个秘密方法。。。

您可以在提交视图中通过附加param?author=github_handle。例如,链接https://github.com/dynjs/dynjs/commits/master?author=jingweno显示了Dynjs项目的提交列表

cat | git log --author="authorName" > author_commits_details.txt

这将以文本格式提供提交。

您可以使用=或“空格”。例如,以下两个命令返回相同的

git log --author="Developer1"

git log --author "Developer1"
git log --author="that user"