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'
The git log command displays all of the commits in a repository's history.
You can list the pull requests associated with a commit using GET /repos/:owner/:repo/commits/:commit_sha/pulls , which will show the pull requests which the given commit is associated with. This does mean that you'll need to check every commit to see if its associated with the PR.
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'
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