Is it possible to cherry-pick a commit from a first remote branch to another remote branch, without checkout any of the two branch?
Asked
Active
Viewed 1,250 times
2 Answers
1
No, there is no possible to do that (all available commands on remote). You must have both branches locally (you may use different names than on remotes) and then do cherry-pick, and push.

Leszek Mazur
- 2,443
- 1
- 14
- 28
-
It is probably possible to do so with libgit (https://libgit2.org/), but it is other story. – Leszek Mazur Jan 24 '20 at 09:32
0
I don't know of a way to do this, at least not assuming that GitHub or Bitbucket be the remote Git providers. Of course, if the first branch were strictly some number of commits ahead of the second branch, then a merge would have the same effect as a cherry-pick, and this is possible via a pull request.
So what you will most likely have to do here is to checkout the two branches, do the cherry-pick, then push/create a pull request.

Tim Biegeleisen
- 502,043
- 27
- 286
- 360