Skip to main content
설명서에 자주 업데이트를 게시하며 이 페이지의 번역이 계속 진행 중일 수 있습니다. 최신 정보는 영어 설명서를 참조하세요.

끌어오기 요청을 베이스 분기와 동기화 상태로 유지

끌어오기 요청을 연 후 변경 내용이 포함된 헤드 분기를 기본 분기에서 변경된 내용과 함께 업데이트할 수 있습니다.

이 기능을 사용할 수 있는 사용자

People with write permissions to the repository to which the head branch of the pull request belongs can update the head branch with changes that have been made in the base branch.

About keeping your pull request in sync

Before merging your pull requests, other changes may get merged into the base branch causing your pull request's head branch to be out of sync. Updating your pull request with the latest changes from the base branch can help catch problems prior to merging.

You can update a pull request's head branch from the command line or the pull request page. The Update branch button is displayed when all of these are true:

  • There are no merge conflicts between the pull request branch and the base branch.
  • The pull request branch is not up to date with the base branch.
  • The base branch requires branches to be up to date before merging or the setting to always suggest updating branches is enabled.

For more information, see "About protected branches" and "Managing suggestions to update pull request branches."

If there are changes to the base branch that cause merge conflicts in your pull request branch, you will not be able to update the branch until all conflicts are resolved. For more information, see "About merge conflicts."

From the pull request page you can update your pull request's branch using a traditional merge or by rebasing. A traditional merge results in a merge commit that merges the base branch into the head branch of the pull request. Rebasing applies the changes from your branch onto the latest version of the base branch. The result is a branch with a linear history, since no merge commit is created.

Updating your pull request branch

  1. Under your repository name, click Pull requests.

    Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled "Pull requests," is outlined in dark orange.

  2. In the "Pull requests" list, click the pull request you'd like to update.

  3. In the merge section near the bottom of the page, you can:

    • Click Update branch to perform a traditional merge.

      Screenshot of the merge section for a pull request.

    • Click the update branch drop down menu, click Update with rebase, and then click Rebase branch to update by rebasing on the base branch.

      Screenshot of the merge section for a pull request. The dropdown menu is expanded, showing "Update with merge commit" and "Update with rebase" options.

Further reading