1
0
mirror of synced 2026-02-02 06:01:58 -05:00

Merge pull request #15024 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2022-02-03 09:36:02 -06:00
committed by GitHub
13 changed files with 88 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -170,6 +170,7 @@ For more information on creating pull requests in {% data variables.product.prod
## Further reading
- "[Creating a pull request from a fork](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)"
- "[Keeping your pull request in sync with the base branch](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch)"
- "[Changing the base branch of a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request)"
- "[Adding issues and pull requests to a project board from the sidebar](/articles/adding-issues-and-pull-requests-to-a-project-board/#adding-issues-and-pull-requests-to-a-project-board-from-the-sidebar)"
- "[About automation for issues and pull requests with query parameters](/issues/tracking-your-work-with-issues/creating-issues/about-automation-for-issues-and-pull-requests-with-query-parameters)"

View File

@@ -22,6 +22,7 @@ children:
- /using-query-parameters-to-create-a-pull-request
- /changing-the-stage-of-a-pull-request
- /requesting-a-pull-request-review
- /keeping-your-pull-request-in-sync-with-the-base-branch
- /changing-the-base-branch-of-a-pull-request
- /committing-changes-to-a-pull-request-branch-created-from-a-fork
shortTitle: Propose changes

View File

@@ -0,0 +1,56 @@
---
title: Keeping your pull request in sync with the base branch
intro: 'After you open a pull request, you can update the head branch, which contains your changes, with any changes that have been made in the base branch.'
permissions: 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.
versions:
fpt: '*'
ghes: '*'
ghae: '*'
ghec: '*'
topics:
- Pull requests
shortTitle: Update the head 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{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} or the setting to always suggest updating branches is enabled{% endif %}.
For more information, see "[Require status checks before merging](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches){% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}" and "[Managing suggestions to update pull request branches](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches){% endif %}."
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](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts)."
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}
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.
{% else %}
Updating your branch from the pull request page performs a traditional merge. The resulting merge commit merges the base branch into the head branch of the pull request.
{% endif %}
## Updating your pull request branch
{% data reusables.repositories.sidebar-pr %}
1. In the "Pull requests" list, click the pull request you'd like to update.
{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}
1. In the merge section near the bottom of the page, you can:
- Click **Update branch** to perform a traditional merge.
![Button to update branch](/assets/images/help/pull_requests/pull-request-update-branch-with-dropdown.png)
- Click the update branch drop down menu, click **Update with rebase**, and then click **Rebase branch** to update by rebasing on the base branch.
![Drop-down menu showing merge and rebase options](/assets/images/help/pull_requests/pull-request-update-branch-rebase-option.png)
{% else %}
1. In the merge section near the bottom of the page, click **Update branch** to perform a traditional merge.
![Button to update branch](/assets/images/help/pull_requests/pull-request-update-branch.png)
{% endif %}
## Further reading
- "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)"
- "[Changing the stage of a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request)"
- "[Committing changes to a pull request branch created from a fork](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork)"

View File

@@ -18,5 +18,5 @@ shortTitle: Configure commit rebasing
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
3. Under "Merge button", select **Allow rebase merging**. This allows contributors to merge a pull request by rebasing their individual commits onto the base branch. If you also select another merge method, collaborators will be able to choose the type of merge commit when merging a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %}
3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow rebase merging**. This allows contributors to merge a pull request by rebasing their individual commits onto the base branch. If you also select another merge method, collaborators will be able to choose the type of merge commit when merging a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %}
![Pull request rebased commits](/assets/images/help/repository/pr-merge-rebase.png)

View File

@@ -20,9 +20,9 @@ shortTitle: Configure commit squashing
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
3. Under "Merge button", optionally select **Allow merge commits**. This allows contributors to merge a pull request with a full history of commits.
3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, optionally select **Allow merge commits**. This allows contributors to merge a pull request with a full history of commits.
![allow_standard_merge_commits](/assets/images/help/repository/pr-merge-full-commits.png)
4. Under "Merge button", select **Allow squash merging**. This allows contributors to merge a pull request by squashing all commits into a single commit. If you select another merge method besides **Allow squash merging**, collaborators will be able to choose the type of merge commit when merging a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %}
4. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow squash merging**. This allows contributors to merge a pull request by squashing all commits into a single commit. If you select another merge method besides **Allow squash merging**, collaborators will be able to choose the type of merge commit when merging a pull request. {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %}
![Pull request squashed commits](/assets/images/help/repository/pr-merge-squash.png)
## Further reading

View File

@@ -16,6 +16,7 @@ children:
- /configuring-commit-squashing-for-pull-requests
- /configuring-commit-rebasing-for-pull-requests
- /using-a-merge-queue
- /managing-suggestions-to-update-pull-request-branches
- /managing-auto-merge-for-pull-requests-in-your-repository
- /managing-the-automatic-deletion-of-branches
shortTitle: Configure PR merges

View File

@@ -25,5 +25,5 @@ If you allow auto-merge for pull requests in your repository, people with write
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
1. Under "Merge button", select or deselect **Allow auto-merge**.
1. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select or deselect **Allow auto-merge**.
![Checkbox to allow or disallow auto-merge](/assets/images/help/pull_requests/allow-auto-merge-checkbox.png)

View File

@@ -0,0 +1,24 @@
---
title: Managing suggestions to update pull request branches
intro: You can give users the ability to always update a pull request branch when it is not up to date with the base branch.
versions:
fpt: '*'
ghes: '> 3.4'
ghae: 'issue-6069'
ghec: '*'
topics:
- Repositories
shortTitle: Manage branch updates
permissions: People with maintainer permissions can enable or disable the setting to suggest updating pull request branches.
---
## About suggestions to update a pull request branch
If you enable the setting to always suggest updating pull request branches in your repository, people with write permissions will always have the ability, on the pull request page, to update a pull request's head branch when it's not up to date with the base branch. When not enabled, the ability to update is only available when the base branch requires branches to be up to date before merging and the branch is not up to date. For more information, see "[Keeping your pull request in sync with the base branch](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch)."
## Managing suggestions to update a pull request branch
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
3. Under "Pull Requests", select or unselect **Always suggest updating pull request branches**.
![Checkbox to enable or disable always suggest updating branch](/assets/images/help/repository/always-suggest-updating-branches.png)

View File

@@ -18,7 +18,7 @@ Anyone with admin permissions to a repository can enable or disable the automati
{% data reusables.repositories.navigate-to-repo %}
{% data reusables.repositories.sidebar-settings %}
3. Under "Merge button", select or unselect **Automatically delete head branches**.
3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select or unselect **Automatically delete head branches**.
![Checkbox to enable or disable automatic deletion of branches](/assets/images/help/repository/automatically-delete-branches.png)
## Further reading