Git 3.0 将使用 main 作为默认分支。
Git 3.0 will use main as the default branch

原始链接: https://thoughtbot.com/blog/git-3-0-will-use-main-as-the-default-branch

从 Git 3.0 开始,预计在 2026 年底发布,新的仓库将默认使用“main”作为初始分支名称,而不是“master”。这一变化由软件自由保护协会于 2020 年宣布,并已被 GitHub 等平台采用,旨在推广包容性语言。 Git 3.0 还将包含重要的技术更新。这些更新包括通过将默认哈希函数从 SHA-1 切换到 SHA-256 来增强安全性,使用新的默认存储格式来提高在 macOS 和 Windows 上的性能和兼容性,以及进一步将 Rust 编程语言集成到 Git 的构建过程中。这些更新代表了广泛使用的版本控制系统的一次重大发展。

相关文章

原文

Starting with Git 3.0, developers will no longer have to configure the default branch for new repositories.

Git 2.52, released this week, includes this small but meaningful line in the patch notes:

Declare that “git init” that is not otherwise configured uses ‘main’ as the initial branch, not ‘master’, starting Git 3.0.

This change has been a long time coming. The Software Freedom Conservancy—the nonprofit home of the Git project—said in June 23, 2020 that Git would eventually update its default branch name. GitHub followed soon after, changing its default branch for new repositories to main on October 1, 2020.

Git 3.0 has no planned release date as of now, but current estimates put it near the end of 2026.

Other notable changes planned for 3.0 include:

  • Changing the default hash function from SHA-1 to SHA-256, improving security.
  • Changing the default storage format to better support macOS and Windows, and to improve performance.
  • More formally integrating Rust into Git’s own build process

About thoughtbot

We've been helping engineering teams deliver exceptional products for over 20 years. Our designers, developers, and product managers work closely with teams to solve your toughest software challenges through collaborative design and development. Learn more about us.

联系我们 contact @ memedata.com