Starting October 1, the master in GitHub will be changed to main by default

GitHub officially stated that starting October 1 this year, all new source code repositories created on the platform will be named “main” by default instead of the original “master”. It is worth noting that existing repositories will not be affected by this change.

As early as June this year, affected by the large-scale “Black Lives Matter” movement in the United States, in order to appease the growing public sentiment, GitHub announced that it would replace terms such as a master. Now, under the urging of some outside voices, this action is finally about to officially land.

Github Rails 6.0

In addition to GitHub, in order to avoid the so-called “racial discrimination”, many technology giants or well-known software have also adjusted their businesses and products to calm public opinion. MySQL announced the deletion of terms such as master, blacklist, and whitelist; Linus Torvalds passed a proposal to avoid terms such as master/slave in Linux; and Twitter, GitHub, Microsoft, LinkedIn, Ansible, Splunk, OpenZFS, OpenSSL, JP Morgan, Android mobile operating system, Go programming language, PHPUnit and Curl announced that they would delete or change such terms.

As for why they chose “main” instead of other alternative words, the explanation given by Github is that main is the most popular alternative to master they see on the platform. And the vocabulary main is very short, which can help users to form good muscle memory; it is also easy to translate in many languages.

Currently, the platform has used main for newly created warehouses and warehouses that are being migrated, such as dependabot-core . However, Github also pointed out that for existing repositories, renaming the default branch will inevitably cause some troubles, such as having to edit pull request settings and modify security policies.

In addition, Github also revealed that by the end of this year, they will make existing repositories seamlessly rename their default branches. When users rename a branch, they will relocate the opened PRs and draft releases, mobile branch protection policy, etc., and all of these will be done automatically.