How to change the base branch of a pull request?

Marcos Vinícius da Silva picture Marcos Vinícius da Silva · Apr 10, 2012 · Viewed 26.4k times · Source

I created a pull request on project on GitHub to a specific remote branch. After some time, the remote branch was deleted.

How can I change the pull request to point to another branch (specifically master)?

Answer

Amber picture Amber · Apr 10, 2012

Updated: as Michael notes below, this is now possible:

You can now change the base branch of an open pull request. After you’ve created a pull request, you can modify the base branch so that the changes in the pull request are compared against a different branch. By changing the base branch of your original pull request rather than opening a new one with the correct base branch, you’ll be able to keep valuable work and discussion.

Click the Edit button by the title of the pull request to reveal the base branch selector.

An animated example of how to change a pull request's base branch.


Old answer

You can't. Just make a new pull request.