Skip to content

Commit b78d9aa

Browse files
committed
Fix claim about Git's default branch name
The blog post about changing the primary branch name of `rust-lang/rust`, as written, claims that the default branch name of *Git*, the open-source version control tool originally written by Linus Torvalds, has changed. As best I can determine, that's not true, at least as of Git v2.51. The mailing list thread from 2020, linked in the post, certainly does not support this claim. That thread discusses making the default branch name for newly-created repositories configurable, and it causes a warning to be shown if this is not configured (indicating that the default may change in the future), but the default when not configured has not been changed. Conversely, *GitHub*, the service now owned by Microsoft, did change the default branch name for newly-created repositories on 2020-10-01. Probably this is what we mean instead. Let's change the post to point to that.
1 parent 74c59b4 commit b78d9aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/inside-rust/renaming-the-default-branch-of-rust-lang-rust.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ team = "the Infra team"
88
team_url = "https://www.rust-lang.org/governance/teams/infra#team-infra"
99
+++
1010

11-
We will be renaming the default branch of the [rust-lang/rust repository](https://github.com/rust-lang/rust) from `master` to `main` on 2025-11-10. We've chosen `main` specifically as it's the [new default in git][git-change] and the renaming will leverage the [GitHub tooling][github-tooling] built to make this easier.
11+
We will be renaming the default branch of the [rust-lang/rust repository](https://github.com/rust-lang/rust) from `master` to `main` on 2025-11-10. We've chosen `main` specifically as it's the default for newly-created repositories [in GitHub][github-change] and the renaming will leverage the [GitHub tooling][github-tooling] built to make this easier.
1212

1313
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.
1414

@@ -26,7 +26,7 @@ git remote prune origin
2626

2727
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].
2828

29-
[git-change]: https://lore.kernel.org/git/[email protected]/
29+
[github-change]: https://github.blog/changelog/2020-10-01-the-default-branch-for-newly-created-repositories-is-now-main/
3030

3131
[github-tooling]: https://github.com/github/renaming
3232

0 commit comments

Comments
 (0)