April 21, 2021

Inclusion in Software Development: Changing Branch Terminology

Changing the name of the "master" branch to "main" is a simple, positive step towards creating a more inclusive environment in software development.

Inclusion in Software Development: Changing Branch Terminology

Inclusion in software development is important. Changing the name of the "master" branch to "main" is a simple, positive step towards creating a more inclusive environment in software development.

As you know, the default branch of a repository is usually called the "master" branch. This has very serious connotations, and has made me uncomfortable using this terminology. It just makes more sense to call it the "default" branch or the "main" branch. There is really no reason to keep calling it the "master" branch any more.

So, from now on, all my repositories will have "main" be the default branch. Instances will be "Primary" and "Secondary" instead of "master" and "slave".
No more "blacklisting" and "whitelisting". Instead this will be "allow list" and "deny list"

It has been almost a year since Dan Williams posted his message on inclusive terminology on the Linux Kernel Mailing List.  By the time the anniversary of that message comes along, I will have all my repos using the new naming convention.

It really is quite simple!

git branch -m master main
This command copies the "master" branch to the "main" branch with all it's history
git push -u origin main
This pushes it to the remote repository

Skip the Merge Request, go to Gitlab or Github and change the default branch to "main" in Settings. Once that is done, delete the "master" branch.

If you are using CI, then you might have to modify some YAML files. Same might apply if you are using hard coded settings in third-party apps.

Let’s dump master-slave terms: they’re vague, horrible, and we’re better off without them - CDM Create Digital Music
It’s not waiting for someone to be “offended.” It’s about why anyone would be defensive about clinging to terrible terms based on horrific inhumane things. Let’s just fix this, finally.