Fundamentals 6 min read

Why GitHub Switched the Default Branch from “master” to “main”

GitHub announced that starting October 1 new repositories will default to the "main" branch instead of "master", a change driven by social concerns and industry-wide efforts to replace terminology perceived as discriminatory, with many other tech companies following suit.

21CTO
21CTO
21CTO
Why GitHub Switched the Default Branch from “master” to “main”

GitHub officially announced that from October 1, all newly created repositories on the platform will default to the branch name "main" instead of the former "master". Existing repositories will not be affected by this change.

Earlier in June, amid the widespread "Black Lives Matter" movement, GitHub declared its intention to replace terms like "master" to avoid associations with slavery, and the initiative is now being implemented.

Beyond GitHub, numerous technology giants and software projects have also adjusted their terminology to avoid perceived racial connotations, including MySQL (removing "master" and blacklist/whitelist), Linus Torvalds' proposal to eliminate "master/slave" in Linux, and companies such as Twitter, Microsoft, LinkedIn, Ansible, Splunk, OpenZFS, OpenSSL, JP Morgan, Android, Go, PHPUnit, and Curl announcing similar changes. IBM, Amazon, and Microsoft have also modified their facial‑recognition platforms to prevent accusations of bias.

The original Git developer Petr Baudis, who coined the term "master", publicly stated in June that he regretted using a word that could cause harm and had long hoped to replace it with "main" or "upstream"; GitHub has now taken the lead in the replacement effort.

GitHub explained that "main" was chosen because it is the most popular alternative, short, easy to remember, and translates easily across many languages.

Currently, GitHub uses "main" for newly created repositories and for migrating existing ones such as dependabot-core. However, renaming the default branch of existing repositories can cause inconveniences, such as needing to edit pull‑request settings and adjust security policies.

GitHub also revealed that by the end of the year it plans to seamlessly rename the default branch of existing repositories, automatically retargeting open pull requests, moving draft versions, and updating branch‑protection rules.

The debate over politically correct terminology in computing is not new. In 2004, "master/slave" was listed among the top ten non‑politically‑correct terms; in 2008, the Drupal community renamed it to "client/server"; and in 2018, the IETF draft required open‑source projects to replace "master/slave" and "blacklist/whitelist".

Some developers oppose these changes, arguing that terms like "master" and "blacklist" do not carry discriminatory intent in code and that the cost of changing them is significant.

Advocates clarify that the goal is not to ban the word "black" itself but to avoid using it as a negative counterpart to "white"; similarly, "master/slave" can evoke slavery when describing a master‑slave relationship in code.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Gitsoftware culturebranch namingTerminology
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.