@@ -287,11 +287,11 @@ in the form:
287287
288288* ` GIT_REMOTE_REF ` : Change to the remote portion of git refspec.
289289 To specify the branch this way, ` refs/heads/BRANCH ` is used
290- (e.g. for ` master ` -> ` refs/heads/master ` ).
290+ (e.g. for ` main ` -> ` refs/heads/main ` ).
291291 For pull requests, it will look like ` refs/pull/PR_NUMBER/head `
292292 (e.g. for pull request #42 -> ` refs/pull/42/head ` ).
293- * ` REBASE_ONTO ` : Change that to ` origin/master ` so the pull request gets rebased
294- onto master . This can especially be important for pull requests that have been
293+ * ` REBASE_ONTO ` : Change that to ` origin/main ` so the pull request gets rebased
294+ onto ` main ` . This can especially be important for pull requests that have been
295295 open a while.
296296
297297Look at the list of jobs on the left hand side under "Build History" and copy
@@ -337,7 +337,7 @@ For undocumented APIs that are public, open a pull request documenting the API.
337337### Breaking changes
338338
339339At least two TSC members must approve backward-incompatible changes to the
340- master branch.
340+ ` main ` branch.
341341
342342Examples of breaking changes include:
343343
@@ -373,7 +373,7 @@ providing a Public API in such cases.
373373#### Unintended breaking changes
374374
375375Sometimes, a change intended to be non-breaking turns out to be a breaking
376- change. If such a change lands on the master branch, a collaborator can revert
376+ change. If such a change lands on the ` main ` branch, a collaborator can revert
377377it. As an alternative to reverting, the TSC can apply the semver-major label
378378after-the-fact.
379379
@@ -462,7 +462,7 @@ duration.
462462
463463Communicate pending deprecations and associated mitigations with the ecosystem
464464as soon as possible. If possible, do it before the pull request adding the
465- deprecation lands on the master branch.
465+ deprecation lands on the ` main ` branch.
466466
467467Use the ` notable-change ` label on pull requests that add or change the
468468deprecation level of an API.
@@ -554,15 +554,15 @@ $ git rebase --abort
554554Checkout proper target branch:
555555
556556``` text
557- $ git checkout master
557+ $ git checkout main
558558```
559559
560560Update the tree (assumes your repository is set up as detailed in
561561[ CONTRIBUTING.md] ( ./pull-requests.md#step-1-fork ) ):
562562
563563``` text
564564$ git fetch upstream
565- $ git merge --ff-only upstream/master
565+ $ git merge --ff-only upstream/main
566566```
567567
568568Apply external patches:
@@ -588,19 +588,19 @@ has landed since the CI run. You will have to ask the author to rebase.
588588Check and re-review the changes:
589589
590590``` text
591- $ git diff upstream/master
591+ $ git diff upstream/main
592592```
593593
594594Check the number of commits and commit messages:
595595
596596``` text
597- $ git log upstream/master ...master
597+ $ git log upstream/main ...main
598598```
599599
600600Squash commits and add metadata:
601601
602602``` text
603- $ git rebase -i upstream/master
603+ $ git rebase -i upstream/main
604604```
605605
606606This will open a screen like this (in the default shell editor):
@@ -670,19 +670,19 @@ for that commit. This is an opportunity to fix commit messages.
670670 pull request.
671671 * Protects against the assumption that GitHub will be around forever.
672672
673- Other changes might have landed on master since the successful CI run. As a
673+ Other changes might have landed on ` main ` since the successful CI run. As a
674674precaution, run tests (` make -j4 test ` or ` vcbuild test ` ).
675675
676676Confirm that the commit message format is correct using
677677[ core-validate-commit] ( https://github.com/nodejs/core-validate-commit ) .
678678
679679``` text
680- $ git rev-list upstream/master ...HEAD | xargs core-validate-commit
680+ $ git rev-list upstream/main ...HEAD | xargs core-validate-commit
681681```
682682
683683Optional: For your own commits, force push the amended commit to the pull
684684request branch. If your branch name is ` bugfix ` , then:
685- ` git push --force-with-lease origin master :bugfix ` . Don't close the pull
685+ ` git push --force-with-lease origin main :bugfix ` . Don't close the pull
686686request. It will close after you push it upstream. It will have the purple
687687merged status rather than the red closed status. If you close the pull request
688688before GitHub adjusts its status, it will show up as a 0 commit pull
@@ -693,7 +693,7 @@ the issue with the red closed status.
693693Time to push it:
694694
695695``` text
696- $ git push upstream master
696+ $ git push upstream main
697697```
698698
699699Close the pull request with a "Landed in ` <commit hash> ` " comment. Even if
@@ -705,27 +705,27 @@ more than one commit.
705705
706706### Troubleshooting
707707
708- Sometimes, when running ` git push upstream master ` , you might get an error
708+ Sometimes, when running ` git push upstream main ` , you might get an error
709709message like this:
710710
711711``` console
712712To https://github.com/nodejs/node
713- ! [rejected] master -> master (fetch first)
713+ ! [rejected] main -> main (fetch first)
714714error: failed to push some refs to 'https://github.com/nodejs/node'
715715hint: Updates were rejected because the tip of your current branch is behind
716716hint: its remote counterpart. Integrate the remote changes (e.g.
717717hint: 'git pull ...') before pushing again.
718718hint: See the 'Note about fast-forwards' in 'git push --help' for details.
719719```
720720
721- That means a commit has landed since your last rebase against ` upstream/master ` .
721+ That means a commit has landed since your last rebase against ` upstream/main ` .
722722To fix this, pull with rebase from upstream, run the tests again, and (if the
723723tests pass) push again:
724724
725725``` bash
726- git pull upstream master --rebase
726+ git pull upstream main --rebase
727727make -j4 test
728- git push upstream master
728+ git push upstream main
729729```
730730
731731### I made a mistake
@@ -755,7 +755,7 @@ the branch.
755755Each LTS release has a corresponding branch (v10.x, v8.x, etc.). Each also has a
756756corresponding staging branch (v10.x-staging, v8.x-staging, etc.).
757757
758- Commits that land on master are cherry-picked to each staging branch as
758+ Commits that land on ` main ` are cherry-picked to each staging branch as
759759appropriate. If a change applies only to the LTS branch, open the pull request
760760against the _ staging_ branch. Commits from the staging branch land on the LTS
761761branch only when a release is being prepared. They might land on the LTS branch
@@ -901,7 +901,7 @@ We use labels to keep track of which branches a commit should land on:
901901 * (for example semver-minor changes that need or should go into an LTS
902902 release)
903903* ` v?.x `
904- * Automatically applied to changes that do not target ` master ` but rather the
904+ * Automatically applied to changes that do not target ` main ` but rather the
905905 ` v?.x-staging ` branch
906906
907907Once a release line enters maintenance mode, the corresponding labels do not
0 commit comments