Is it possible to cherry-pick all pending PR from github?
Let's say I have 4 PR from 4 different forked repositories waiting for review. I need to apply all of them to the latest source code.
PR#65 Do something
PR#61 Notify this
PR#55 Fix that
PR#42 Show there
I know that I can git remote add
all repositories and cherry-pick them one by one. However, I believe there would be easier/shorter way to cherry-pick all pending pull request which I don't know yet ;)
Thanks in advance
add pr/* to .git/config
test_repo
$ git remote -v
test_repo http://github/testA.git (fetch)
test_repo http://github/testA.git (push)
vim .git/config
[remote "test_repo"]
fetch = +refs/pull/*/head:refs/remotes/test_repo/pr/*
so it would look like
[remote "test_repo"]
url = http://github/testA.git
fetch = +refs/heads/*:refs/remotes/test_repo/*
fetch = +refs/pull/*/head:refs/remotes/test_repo/pr/* <-- this line was added
$ git fetch test_repo
* [new ref] refs/pull/16/head -> test_repo/pr/16
* [new ref] refs/pull/17/head -> test_repo/pr/17
* [new ref] refs/pull/18/head -> test_repo/pr/18
* [new ref] refs/pull/19/head -> test_repo/pr/19
git cherry-pick test_repo/pr/xx
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