1
0
mirror of synced 2026-02-03 18:01:56 -05:00

Merge pull request #7545 from github/repo-sync

repo sync
This commit is contained in:
Octomerger Bot
2021-06-22 02:12:33 +10:00
committed by GitHub
4 changed files with 20 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@@ -12,6 +12,22 @@ versions:
topics:
- Pull requests
---
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}
### Syncing a fork from the web UI
1. On {% data variables.product.product_name %}, navigate to the main page of the forked repository that you want to sync with the upstream repository.
1. Select the **Fetch upstream** drop-down.
!["Fetch upstream" drop-down](/assets/images/help/repository/fetch-upstream-drop-down.png)
1. Review the details about the commits from the upstream repository, then click **Fetch and merge**.
!["Fetch and merge" button](/assets/images/help/repository/fetch-and-merge-button.png)
If the changes from the upstream repository cause conflicts, {% data variables.product.company_short %} will prompt you to create a pull request to resolve the conflicts.
### Syncing a fork from the command line
{% endif %}
Before you can sync your fork with an upstream repository, you must [configure a remote that points to the upstream repository](/articles/configuring-a-remote-for-a-fork) in Git.
{% data reusables.command_line.open_the_multi_os_terminal %}

View File

@@ -66,7 +66,9 @@ Forking a repository is a simple two-step process. We've created a repository fo
### Keep your fork synced
You might fork a project to propose changes to the upstream, or original, repository. In this case, it's good practice to regularly sync your fork with the upstream repository. To do this, you'll need to use Git on the command line. You can practice setting the upstream repository using the same [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository you just forked.
You might fork a project to propose changes to the upstream, or original, repository. In this case, it's good practice to regularly sync your fork with the upstream repository. If you check out the project locally to work on the project on your computer, you can use Git on the command line. You can practice setting the upstream repository using the same [octocat/Spoon-Knife](https://github.com/octocat/Spoon-Knife) repository you just forked.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "github-ae@next" %}If you're not working on the project locally, you can also sync a fork directly on {% data variables.product.product_name %}. For more information, see "[Syncing a fork](/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)."{% endif %}
#### Step 1: Set up Git
@@ -129,7 +131,7 @@ When you fork a project in order to propose changes to the original repository,
> upstream https://{% data variables.command_line.codeblock %}/<em>ORIGINAL_OWNER</em>/<em>ORIGINAL_REPOSITORY</em>.git (push)
```
Now, you can keep your fork synced with the upstream repository with a few Git commands. For more information, see "[Syncing a fork](/articles/syncing-a-fork)."
Now, you can keep your fork synced with the upstream repository either in the web UI or locally on your computer. For more information, see "[Syncing a fork](/github/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-in-the-web-ui)."
#### 다음 단계