👋 We've unified all of GitHub's product documentation in one place! Check out the content for REST API, GraphQL API, and Developers. Learn more on the GitHub blog.
Article version: Enterprise Server 2.19

Changing the base branch of a pull request

After a pull request is opened, you can change the base branch to compare the changes in the pull request against a different branch.

Were you able to find what you were looking for?

Warning: When you change the base branch of your pull request, some commits may be removed from the timeline. Review comments may also become outdated, as the line of code that the comment referenced may no longer be part of the changes in the pull request.

  1. Under your repository name, click Pull requests.
    Issues and pull requests tab selection
  2. In the "Pull Requests" list, click the pull request you'd like to modify.
  3. Next to the pull request's title, click Edit.
    Pull Request edit button
  4. In the base branch drop-down menu, select the base branch you'd like to compare changes against.
    Base branch drop-down menu
  5. Read the information about changing the base branch and click Change base.
    Base branch change confirmation button

Further reading

Were you able to find what you were looking for?

Ask a human

Can't find what you're looking for?

Contact us