1
0
mirror of synced 2026-01-07 18:01:41 -05:00

Merge pull request #49962 from github/repo-sync

Repo sync
This commit is contained in:
docs-bot
2024-04-01 14:29:32 -04:00
committed by GitHub

View File

@@ -42,10 +42,10 @@ If the changes from the upstream repository cause conflicts, {% data variables.p
{% data reusables.cli.about-cli %} To learn more about {% data variables.product.prodname_cli %}, see "[AUTOTITLE](/github-cli/github-cli/about-github-cli)."
To update the remote fork from its parent, use the `gh repo sync -b BRANCHNAME` subcommand and supply your fork and branch name as arguments.
To update the remote fork from its parent, use the `gh repo sync -b BRANCH-NAME` subcommand and supply your fork and branch name as arguments.
```shell
gh repo sync owner/cli-fork -b BRANCH_NAME
gh repo sync owner/cli-fork -b BRANCH-NAME
```
If the changes from the upstream repository cause conflict then the {% data variables.product.prodname_cli %} can't sync. You can set the `--force` flag to overwrite the destination branch.
@@ -56,7 +56,7 @@ Before you can sync your fork with an upstream repository, you must configure a
{% data reusables.command_line.open_the_multi_os_terminal %}
1. Change the current working directory to your local project.
1. Fetch the branches and their respective commits from the upstream repository. Commits to `BRANCHNAME` will be stored in the local branch `upstream/BRANCHNAME`.
1. Fetch the branches and their respective commits from the upstream repository. Commits to `BRANCH-NAME` will be stored in the local branch `upstream/BRANCH-NAME`.
```shell
$ git fetch upstream
@@ -64,7 +64,7 @@ Before you can sync your fork with an upstream repository, you must configure a
> remote: Compressing objects: 100% (53/53), done.
> remote: Total 62 (delta 27), reused 44 (delta 9)
> Unpacking objects: 100% (62/62), done.
> From https://{% data variables.command_line.codeblock %}/ORIGINAL_OWNER/ORIGINAL_REPOSITORY
> From https://{% data variables.command_line.codeblock %}/ORIGINAL-OWNER/ORIGINAL-REPOSITORY
> * [new branch] main -> upstream/main
```