惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
量子位
T
Tailwind CSS Blog
Vercel News
Vercel News
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
U
Unit 42
Engineering at Meta
Engineering at Meta
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
D
Docker
博客园_首页
P
Proofpoint News Feed
月光博客
月光博客
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
腾讯CDC
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

Rust Blog

Security Advisory for Cargo (CVE-2026-5223) | Rust Blog Security Advisory for Cargo (CVE-2026-5222) | Rust Blog Project goals update — April 2026 (end of 2025H2) | Rust Blog Rust is participating in Outreachy | Rust Blog Raising the baseline for the `nvptx64-nvidia-cuda` target | Rust Blog Announcing Google Summer of Code 2026 selected projects | Rust Blog Announcing Rust 1.95.0 | Rust Blog docs.rs: building fewer targets by default | Rust Blog Changes to WebAssembly targets and handling undefined symbols | Rust Blog Announcing Rust 1.94.1 | Rust Blog Security advisory for Cargo | Rust Blog What we heard about Rust's challenges | Rust Blog Call for Testing: Build Dir Layout v2 | Rust Blog Announcing rustup 1.29.0 | Rust Blog Announcing Rust 1.94.0 | Rust Blog 2025 State of Rust Survey Results | Rust Blog Rust debugging survey 2026 | Rust Blog Update on the October 15, 2018 incident on crates.io Announcing Rust 1.29.2 Announcing Rust 1.29 Announcing Rust 1.28 What is Rust 2018? Announcing Rust 1.27.2 Announcing Rust 1.27.1 Security Advisory for rustdoc Announcing Rust 1.27 Announcing Rust 1.26.2 Announcing Rust 1.26.1 Rust turns three Announcing Rust 1.26
Renaming the default branch of rust-lang/rust | Inside Ru...
Jake Goulding on behalf of the Infra team · 2025-10-16 · via Rust Blog

The rename happened on November 10, 2025. The default branch of rust-lang/rust is now named main.

We will be renaming the default branch of the rust-lang/rust repository from master to main on 2025-11-10. We've chosen main specifically as it's the default for newly-created repositories in GitHub and the renaming will leverage the GitHub tooling built to make this easier.

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 a few git commands in their local checkout of the repository to update. Note that the specific commands that should be executed might differ based on the way you use git and how your local checkout is configured. We provide a guide below that we think should work for most use-cases, but your mileage may vary.

Please try to follow the guide step-by-step, and if you run into any problems, feel free to ask in this Zulip channel.

Renaming your fork's default branch

If you have a fork of the rust-lang/rust repository on GitHub, you should first update its default branch name before continuing. If you do not rename it and later run git checkout master, git will create a master branch based on your fork's outdated master branch, which can be confusing. Some of the following git commands in this post might also not work as expected.

Here is how you can update your fork's default branch:

  1. Go to https://github.com/<your-username>/rust/settings
  2. Find the default branch section, click on the "Rename branch" button (pencil icon) and rename the branch to main.

Updating your local git checkout

Execute the following git commands in your local checkout of the rust repository.

Note that the instructions below make two assumptions:

  • You have a git remote called upstream that points to the rust-lang/rust repository and a remote called origin that points to your <username>/rust fork. Please update the commands accordingly if you use a different setup.
    • You can find out which remotes you have configured using the git remote -v command.
  • Your local master branch tracks the default branch of your fork, not the default branch of the upstream rust-lang/rust repository. If that is not the case, execute the commented git branch command instead.
    • You can find which remote your local master branch tracks by using git branch -vv --contains master (the tracked branch should be shown in square brackets).
# Update the local branch name
git branch --move master main

# Update local references to your <username>/rust fork
git fetch origin
git branch --set-upstream-to=origin/main main # If your main branch tracks your fork
git remote set-head origin --auto

# Update local references relevant to the upstream rust-lang/rust repository
git fetch upstream
#git branch --set-upstream-to=upstream/main main # If your main branch tracks the upstream repo
git remote set-head upstream --auto

# Remove old branch names (optional, but recommended)
git remote prune origin
git remote prune upstream