Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Before you can sync your fork with an upstream repository, you must [configure a

{% data reusables.command_line.open_the_multi_os_terminal %}
2. Change the current working directory to your local project.
3. Fetch the branches and their respective commits from the upstream repository. Commits to `main` will be stored in a local branch, `upstream/main`.
3. Fetch the branches and their respective commits from the upstream repository. Commits to `BRANCHNAME` will be stored in the local branch `upstream/BRANCHNAME`.
```shell
$ git fetch upstream
> remote: Counting objects: 75, done.
Expand All @@ -23,12 +23,12 @@ Before you can sync your fork with an upstream repository, you must [configure a
> From https://{% data variables.command_line.codeblock %}/<em>ORIGINAL_OWNER</em>/<em>ORIGINAL_REPOSITORY</em>
> * [new branch] main -> upstream/main
```
4. Check out your fork's local `main` branch.
4. Check out your fork's local default branch - in this case, we use `main`.
```shell
$ git checkout main
> Switched to branch 'main'
```
5. Merge the changes from `upstream/main` into your local `main` branch. This brings your fork's `main` branch into sync with the upstream repository, without losing your local changes.
5. Merge the changes from the upstream default branch - in this case, `upstream/main` - into your local default branch. This brings your fork's default branch into sync with the upstream repository, without losing your local changes.
```shell
$ git merge upstream/main
> Updating a422352..5fdff0f
Expand Down