Skip to content

Commit

Permalink
perf: change master branch to main
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Dec 22, 2024
1 parent 643ada9 commit 31ebef4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions docs/upstream.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintaining your fork's upstream relationship

So you forked this repo. That's awesome. But don't forget you keep your `master` branch in sync with the upstream `master` branch to ensure that your pull requests will always be able to be merged.
So you forked this repo. That's awesome. But don't forget you keep your `main` branch in sync with the upstream `main` branch to ensure that your pull requests will always be able to be merged.

## How to sync with upstream?

Expand Down Expand Up @@ -42,39 +42,39 @@ upstream https://github.com/AlaskaAirlines/auro-pane.git (push)

#### Sync upstream

To sync your `master` branch with the upstream `master` branch, there are two ways you can do this. The preferred method is to fetch and rebase. Please do not merge down.
To sync your `main` branch with the upstream `main` branch, there are two ways you can do this. The preferred method is to fetch and rebase. Please do not merge down.

```bash
$ git checkout master
$ git checkout main

$ git fetch upstream
$ git rebase upstream/master
$ git rebase upstream/main
```

Then to sync your feature brach,

```bash
$ git checkout feature-branch
$ git rebase master
$ git rebase main
```

#### Brute force

In the case where your `master` branch's history is not in sync with the upstream, then you have few options. The nuclear option is to trash the fork and re-fork, but there is an easier way. the following step will force reset your `master` branch with that of the upstream `master` branch.
In the case where your `main` branch's history is not in sync with the upstream, then you have few options. The nuclear option is to trash the fork and re-fork, but there is an easier way. the following step will force reset your `main` branch with that of the upstream `main` branch.

```bash
$ git reset --hard upstream/master
$ git reset --hard upstream/main
```

Just to make sure that all things are synced correctly, run the following:

```bash
$ git checkout master
$ git checkout main

$ git fetch upstream
$ git merge upstream/master
$ git merge upstream/main
```

## Maintain upstream

Once you have connected your local forked clone to the upstream repo, maintenance is the key. It is important to ensure that your `master` branch is always updated BEFORE you create a new branch intended to be used with a new pull request. This will help to eliminate any potential issues with merging when the `master` branches are out of sync.
Once you have connected your local forked clone to the upstream repo, maintenance is the key. It is important to ensure that your `main` branch is always updated BEFORE you create a new branch intended to be used with a new pull request. This will help to eliminate any potential issues with merging when the `main` branches are out of sync.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"release": {
"branches": [
{
"name": "master"
"name": "main"
},
{
"name": "beta",
Expand Down

0 comments on commit 31ebef4

Please sign in to comment.