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?
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).
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\)'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With