mirror of
https://github.com/espressif/openthread.git
synced 2026-09-15 13:40:06 +00:00
[git] reflect branch rename from 'master' to 'main' (#6249)
This commit is contained in:
+7
-7
@@ -63,7 +63,7 @@ For each new feature, create a working branch:
|
||||
|
||||
```bash
|
||||
# Create a working branch for your new feature
|
||||
git branch --track <branch-name> origin/master
|
||||
git branch --track <branch-name> origin/main
|
||||
|
||||
# Checkout the branch
|
||||
git checkout <branch-name>
|
||||
@@ -85,16 +85,16 @@ This will open up a text editor where you can craft your commit message.
|
||||
|
||||
Prior to submitting your pull request, you might want to do a few things to clean up your branch and make it as simple as possible for the original repo's maintainer to test, accept, and merge your work.
|
||||
|
||||
If any commits have been made to the upstream master branch, you should rebase your development branch so that merging it will be a simple fast-forward that won't require any conflict resolution work.
|
||||
If any commits have been made to the upstream main branch, you should rebase your development branch so that merging it will be a simple fast-forward that won't require any conflict resolution work.
|
||||
|
||||
```bash
|
||||
# Fetch upstream master and merge with your repo's master branch
|
||||
git checkout master
|
||||
git pull upstream master
|
||||
# Fetch upstream main and merge with your repo's main branch
|
||||
git checkout main
|
||||
git pull upstream main
|
||||
|
||||
# If there were any new commits, rebase your development branch
|
||||
git checkout <branch-name>
|
||||
git rebase master
|
||||
git rebase main
|
||||
```
|
||||
|
||||
Now, it may be desirable to squash some of your smaller commits down into a small number of larger more cohesive commits. You can do this with an interactive rebase:
|
||||
@@ -102,7 +102,7 @@ Now, it may be desirable to squash some of your smaller commits down into a smal
|
||||
```bash
|
||||
# Rebase all commits on your development branch
|
||||
git checkout
|
||||
git rebase -i master
|
||||
git rebase -i main
|
||||
```
|
||||
|
||||
This will open up a text editor where you can specify which commits to squash.
|
||||
|
||||
Reference in New Issue
Block a user