How to change the migration request on GitHub to change the target branch for merging?

I have a transfer request that requests a merge to master from my branch, but the owner wants me to change the join request to another branch from my branch.

Is it possible? What are the possible solutions?

+68
git github
Jun 11 '14 at 9:16
source share
5 answers

August 2016 Update: Change the base branch of the Pull request finally allows you to change this branch.
(And that closes question 18 , which was 3 years old and had 1,500+ comments)

After you create the transfer request, you can change the base branch so that the changes in the transfer request are compared with another branch.

enter image description here




Original answer:

Since PR cannot be edited in terms of a branch (see below), the simplest way would be:

  • create a local new branch on top of the current branch
  • click this new branch
  • create a new PR with the desired destination.
  • close previous PR
  • refers to the "old" pull request from the new; eg. Supersedes #123 (as described below by Rivera )



(original answer, valid only when creating PR)

You can try and select a different base branch , as in the section Changing the range of branches and the recipient repository "(By clicking the Edit button at the top of the PR page)

https://github-images.s3.amazonaws.com/help/pull_requests/pull-request-review-edit-branch.png

The easiest way to think about a range of branches is as follows:

  • base branch - this is where you think the changes should apply,
  • the branch of the head is what you would like to apply.

Change changes to the underlying repository that is notified of the migration request.
Anyone who can click on the base repository will receive an email notification and will see a new transfer request in their panel the next time they log in.

If you select the base branch of the one that the original maintainer (owner) wants to use, your PR should merge from your branch (unchanged) into a new base branch.

+73
Jun 11 '14 at 9:21
source share

If your branch is (remotely) accessible remotely, you do not need to create a new branch locally.

  • Select your branch (which bears your changes) either from the drop-down menu or under "# branch" ( https://github.com/account/project/branches ).

  • Click "New request to select." This allows you to select a new base (target) branch.

Here is a screenshot of the new Github interface: enter image description here

I can send a PR of a UX branch to any branch / branch --- it doesn’t matter if I sent a PR to a UX branch before.

+4
Nov 26 '15 at 17:46
source share

You need to create a new pull request as specified in the gibhub LINK doc

  • First select New Pull request
  • in the compare page , on the left, select the target branch you want to click and the right side, select branch you already pushed .
  • Update the data for your new PR .
  • Create a PR
+1
Jul 25 '16 at 8:09
source share

Now you can: https://github.com/blog/2224-change-the-base-branch-of-a-pull-request

β€œNow you can change the base branch of an open stretch request. After you create a pull request, you can change the base branch so that the changes in the stretch request are compared to another branch. Changing the base branch of your original pull request, and by not opening a new one with the right base branch, you can save valuable work and discussion. "

+1
Aug 19 '16 at 23:30
source share

It is pretty simple. Just press the PR for which you want to change your base branch. Find the "Close pull request" button next to the bottom of the web page. Now you can recreate the new PR in normal mode - make sure that this time you have chosen the correct base branch.

-four
Dec 30 '15 at 13:50
source share



All Articles