I need to get the changes from a pull request which isn't yet merged into a branch.
I could cherry-pick each commit from the branch but there are quite a few of them. Is there a quicker way to get all the changes from a pull request?
In case it makes a difference Im using Github.
The reason why you should use cherry-pick rarely is that it easily creates "duplicate" commits: when you integrate a commit into your HEAD branch using cherry-pick, Git has to create a new commit with the exact same contents. It is, however, a completely new commit object with its own, new SHA identifier.
There can be only one open PR from a given branch.
Right-click the branch containing the changes you want and select View History.... Right-click the commit you want to cherry-pick and select Cherry-pick. Visual Studio copies the changes made in that commit into a new one on your current branch.
If the pull request is from a branch that is contained in your repository, as RedX noted, you can follow the instructions in this post.
On the other hand, if the pull request is from someone's fork of your repository, you'll first have to add their repository as a remote, pull in their branches, then cherry-pick as described in the post above.
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