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


当前回答

要获取更多详细信息-(此处%an指作者)

使用此项:-

git log --author="username" --pretty=format:"%h - %an, %ar : %s"

其他回答

git log --author="that user"

如果要过滤自己的提交:

git log --author="<$(git config user.email)>"
cat | git log --author="authorName" > author_commits_details.txt

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

如果您使用IntelliJ,您可以转到

View -> Tool Windows -> Git

选择“日志”并单击“用户:全部”

然后键入作者的姓名,它将显示该作者的每一次提交

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

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