How to get commits by multiple authors?

Viewed 258

I can get commits for one author like:

git log <branch_1>..<branch_2> --author=John
git log <branch_1>..<branch_2> --author=Mike

But how can I get commits for both John, Mike at the same time?

1 Answers

Pass the --author twice:

git log -i <branch_1>..<branch_2> --author=john --author=mike

Or, since --author accepts regex, you can do:

git log --author='\(John\)\|\(Mike\)'
Related