Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get commits by multiple authors?

Tags:

git

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?

like image 490
mrgloom Avatar asked May 26 '21 12:05

mrgloom


People also ask

What does authored mean in GitHub?

Authors are the people who wrote a specific piece of code - committers are the people who put these changes into the git "history". Normally both are the same (and doesn't change on merging, cloning, pushing or pulling).


Video Answer


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\)'
like image 155
Maroun Avatar answered Oct 24 '22 18:10

Maroun