Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ We will be renaming the default branch of the [rust-lang/rust repository](https:

If you maintain a tool that currently assumes the default branch of `rust-lang/rust` is named `master`, using `HEAD` instead will work both before and after the rename.

After the rename, contributors will need to run the following commands in their local checkout of the repository, assuming that your remote registry is called `origin`:
After the rename, contributors will need to run the following commands in their local checkout of the repository, assuming that your upstream remote is called `origin`:

```bash
git branch -m master main
Expand All @@ -27,6 +27,8 @@ git remote prune origin

If you have a fork of the `rust-lang/rust` repository on GitHub and would like to rename your default branch to match, you can follow [GitHub's instructions][github-how-to-rename].

**We recommend you to rename the default branch of your fork.** If you do not do it, and you will some day type `git checkout master` from muscle memory, git will create a fresh `master` branch based on your fork's `master` branch, which will be outdated. This behavior can be quite confusing.

[github-change]: https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/

[github-tooling]: https://github.com/github/renaming
Expand Down