Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 2.4 KB

File metadata and controls

38 lines (30 loc) · 2.4 KB
title Changing the base branch of a pull request
intro After a pull request is opened, you can change the base branch to compare the changes in the pull request against a different branch.
redirect_from
/github/collaborating-with-issues-and-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request
/articles/changing-the-base-branch-of-a-pull-request
/github/collaborating-with-issues-and-pull-requests/changing-the-base-branch-of-a-pull-request
/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request
versions
fpt ghes ghec
*
*
*
shortTitle Change the base branch
category
Create pull requests

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.

{% data reusables.repositories.sidebar-pr %}

  1. In the "Pull Requests" list, click the pull request you'd like to modify.

  2. Next to the pull request's title, click the {% octicon "pencil" aria-hidden="true" aria-label="The edit icon" %} pencil icon.

  3. In the base branch drop-down menu, select the base branch you'd like to compare changes against.

    Screenshot of a pull request title. The dropdown to change the base branch is outlined in dark orange.

  4. Read the information about changing the base branch and click Change base.

Tip

When you open a pull request, {% data variables.product.github %} will set the base to the commit that branch references. If the branch is updated in the future, {% data variables.product.github %} will not update the base branch's commit.

Further reading