Skip to content

Commit

Permalink
doc: update phrasing to use default branch rather than main in Sy…
Browse files Browse the repository at this point in the history
…ncing a Fork (github#842)

* doc: update phrasing to use `default branch` rather than `main`

* doc: use active voice

* Modify step 3 and fix typo

The point being made in step 3 is a general one that applies to all branches, so I've modified a sentence slightly.
Corrected a typo in step 5.

Co-authored-by: hubwriter <hubwriter@github.com>
  • Loading branch information
bnb and hubwriter authored Nov 3, 2020
1 parent 0b58868 commit 7407320
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 7407320

Please sign in to comment.