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


当前回答

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

使用此项:-

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

其他回答

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

View -> Tool Windows -> Git

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

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

您甚至可以通过简单地使用用户名的一部分来简化这一点:

git log --author=mr  #if you're looking for mrfoobar's commits

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

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

如果要过滤自己的提交:

git log --author="<$(git config user.email)>"
git log --author="that user"