Git 3.0 will use main as the default branch

Justin Toniazzo

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.