File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Rename default branch to ` main `
2+
3+ The standard default branch name is ` main ` for all projects. Follow the steps below to update older projects using ` master ` branch.
4+
5+ It can be done in the GitHub repository, under Settings -> Default branch.
6+
7+ - https://github.com/TangibleInc/example-plugin/settings
8+
9+ After the switch, it also requires a change in any locally cloned repo.
10+
11+ ``` sh
12+ git checkout master
13+ git branch -m master main
14+ git fetch origin
15+ git branch --unset-upstream
16+ git branch -u origin/main
17+ ```
Original file line number Diff line number Diff line change @@ -47,6 +47,8 @@ Rename main branch from "master" to "main".
4747git branch -M main
4848```
4949
50+ For existing projects, see the guide [ Rename default branch to ` main ` ] ( main-branch ) .
51+
5052Push to remote ` origin ` , setting it as the upstream of main branch.
5153
5254``` sh
Original file line number Diff line number Diff line change @@ -145,6 +145,10 @@ const sidebars: SidebarsConfig = {
145145 type : 'doc' ,
146146 id : 'guides/plugin-upgrade' ,
147147 } ,
148+ {
149+ type : 'doc' ,
150+ id : 'guides/main-branch' ,
151+ } ,
148152 {
149153 type : 'doc' ,
150154 id : 'guides/github-pages' ,
You can’t perform that action at this time.
0 commit comments