Reputation: 113335
If I want to get Alice
's commits I use git log --author 'Alice'
. But what if I want to include there Bob
's commits as well?
I tried the following:
git log --author 'Alice|Bob'
git log --author 'Alice,Bob'
Upvotes: 5
Views: 78
Reputation: 737
Try it with the same argument multiple times:
git log --author 'alice' --author 'bob'
edit:
If Git is compiled with the right flags (USE_LIBPCRE) you can pass the option --perl-regexp
so the pattern for search is interpreted as a regular expression:
git log --perl-regexp --author 'alice|bob'
...Found more:
Git interprets all patterns in the options as regex. Only if you want to use Perl compatible regex you need the option --perl-regexp
.
But if you want to use normal regex, you have to escape the "or":
git log --author 'alice\|bob'
Upvotes: 5