Main or Master: Where Do You Git-llegiances lie?

Originally published at: https://tech.frocentric.io/2023/01/06/main-or-master-where-do-you-git-llegiances-lie/

Originally posted by James Midzi to Main or Master: Where Do You Git-llegiances lie? If you’ve been using github long enough, you’ll recall a time where your primary branch was named master by default. Master was all we knew as the primary. Then, I don’t exactly recall when, a decision was made to now make…

1 Like

The decision was implemented by GitHub in October 2020, as one of a number of efforts across the industry to utilise more inclusive language in the wake of conversations around inherent racism in tech terminology following the George Floyd protests.

GitHub aren’t alone in this as many major companies including Apple, Google, Meta, Twitter, etc, have since moved to remove terms with racist connotations such as “master/slave” and “blacklist/whitelist” with more equitable alternatives, such as “primary/secondary” and “allow list/deny list”.

With all the major cloud platforms like GitLab and Atlassian also having set “main” as the default and Git’s official clients now also offering the ability to set “main” as the default branch for locally-created repos, there’s now not really any reason to retain “master” as default unless you have some stubborn sense of loyalty to that term.

1 Like

Hmm, I did not know that those events had that much of a reverberating effect.

Thank you for the lesson…

Stubborn he says :joy::joy:. Not loyalty no, certain things make more sense to me than others. I use “main” with no problem, I just can’t bring myself to start a personal project with it as my primary branch - my stint in engineering left its mark

You are, of course, entitled to use whatever naming convention you prefer for your personal work, but in many professional and open-source teams, you’re likely to now see “main” used as the default. Git themselves are working to make it the default default branch for local repositories to match the behaviour of all the cloud providers.

I just literally pushed a commit to an old utility script that was written with “master” hardcoded as the target branch, because all the repos I need to run it against now use “main” instead. Even if you don’t agree with the rationale behind the change, it’s likely just a matter of time until it becomes just an unnecessary practical hassle to continue with the old naming.

1 Like

Absolutely, of course.

Oh yes “main” is the convention now and I’m okay with it. Be like water and all that.

I understand the rationale behind the change (your explanation helped). And with that understanding, I’m wiser for it.

1 Like