1
0
mirror of synced 2026-01-08 21:02:10 -05:00

Merge pull request #49961 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-04-01 13:55:47 -04:00
committed by GitHub
2 changed files with 6 additions and 6 deletions

View File

@@ -27,7 +27,7 @@ shortTitle: Configure a remote repository
1. Specify a new remote _upstream_ repository that will be synced with the fork.
```shell
git remote add upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
git remote add upstream https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git
```
1. Verify the new upstream repository you've specified for your fork.
@@ -36,6 +36,6 @@ shortTitle: Configure a remote repository
$ git remote -v
> origin https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-FORK.git (fetch)
> origin https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-FORK.git (push)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (fetch)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (push)
```

View File

@@ -172,7 +172,7 @@ When you fork a project in order to propose changes to the upstream repository,
1. Type `git remote add upstream`, and then paste the URL you copied in Step 3 and press **Enter**. It will look like this:
```shell
git remote add upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/Spoon-Knife.git
git remote add upstream https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/Spoon-Knife.git
```
1. To verify the new upstream repository you have specified for your fork, type `git remote -v` again. You should see the URL for your fork as `origin`, and the URL for the upstream repository as `upstream`.
@@ -181,8 +181,8 @@ When you fork a project in order to propose changes to the upstream repository,
$ git remote -v
> origin https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-FORK.git (fetch)
> origin https://{% data variables.command_line.codeblock %}/YOUR-USERNAME/YOUR-FORK.git (push)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (fetch)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git (push)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (fetch)
> upstream https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/ORIGINAL-REPOSITORY.git (push)
```
Now, you can keep your fork synced with the upstream repository with a few Git commands. For more information, see "[AUTOTITLE](/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork)."