如果我想查找由Joe Blo编写的提交记录,非常简单:
git log --author=joe.blo@x.com
但是如果提交是按照以下方式创建的:
git commit -m "Our awesome code changes.
>
>
Co-authored-by: Joe Blo <joe.blo@x.com>
Co-authored-by: Henry Chilinsky <henry@example.com>"
上述示例中,Joe 被认定为合著者,但我的原始查询 --author=joe.blo@x.com
将找不到该提交。如何查找 Joe 作为合著者的提交?
编辑:首选命令行解决方案,但支持此功能的第三方工具将获得额外加分: tig
、github
、tower
,等等。
git log --pretty="%C(cyan)%ad %<(7,trunc)%aN %C(yellow)%h %C(cyan)%d %Creset%s %(trailers:key=Co-authored-by)" --date-order --graph --date=iso --grep="Matt"
对我很有帮助。虽然我还不知道如何以这种方式在GitHub上搜索,但至少现在我可以在本地这样做了。我将您的答案与https://stackoverflow.com/a/73584751/470749和https://github.blog/2018-01-29-commit-together-with-co-authors/结合在一起。 - undefined