繁体   English   中英

获取特定作者(不止一个)的提交

[英]Get the commits made by specific authors (more than one)

如果我想获取Alice的提交,请使用git log --author 'Alice' 但是,如果我也想在其中包含Bob的提交怎么办?

我尝试了以下方法:

git log --author 'Alice|Bob'
git log --author 'Alice,Bob'

多次尝试使用相同的参数:

git log --author 'alice' --author 'bob'

编辑:如果使用正确的标志(USE_LIBPCRE)编译了Git,则可以传递--perl-regexp选项,以便将搜索模式解释为正则表达式:

git log --perl-regexp --author 'alice|bob' 

...发现更多:Git将选项中的所有模式解释为正则表达式。 仅当您想使用与Perl兼容的正则表达式时,才需要--perl-regexp选项。 但是,如果要使用普通的正则表达式,则必须转义“或”:

git log --author 'alice\|bob' 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM