DEV Community

Cover image for Make master Branch Default Again
David Paluy
David Paluy

Posted on

Make master Branch Default Again

Remember: Good version control is about maintaining a clear, authoritative source of truth for your code. The name should serve this purpose first and foremost.


I didn't follow the trend of changing my default branch from master to main. It doesn't make any sense to spend my resources reconfiguring my settings.
Also, DHH agreed that it was a classic exploit of good faith.

Historical Context: The Master Craftsman Tradition

The term "master" has a rich history in European guild systems and skilled trades dating back centuries. A master craftsman (or "Meister" in German-speaking regions) was someone who had achieved the highest level of skill and expertise in their trade. This usage derives from the Latin "magister," meaning "teacher" or "chief."

  • Apprentices would study under a master to learn their craft
  • Becoming a master required years of study and the creation of a "masterpiece"
  • Masters were teachers and guardians of quality standards
  • The title "Master" indicated expertise and teaching authority, not ownership

Git's Usage of "Master"

When Git was developed, the term "master" was chosen for the default branch to indicate it as the authoritative version of the code - the version from which all other branches derive their work. This usage aligns with:

  • Master recordings in audio production (the final, authoritative mix)
  • Master copies in publishing (the definitive version)
  • Master's degrees in academia (advanced level of subject expertise)

Technical Benefits of "Master"

  1. Widely Recognized: The term is universally understood in version control systems
  2. Tool Compatibility: Many CI/CD tools and scripts expect "master" as the default
  3. Clear Meaning: Instantly communicates which branch is authoritative
  4. Historical Continuity: Maintains compatibility with existing documentation and workflows

Github Update

Personal Settings

  1. Visit: https://github.com/settings/repositories
  2. Set the default repository branch to: master

Repository Default Branch in Github

Organization Account

  1. Go to Organization settings of your repository: https://github.com/organizations/[ORGANIZATION]/settings/repository-defaults
  2. Set the default repository branch to: master

Top comments (13)

Collapse
 
waelsafa profile image
waelsafa

it's just a branch name, get over it.

Collapse
 
webjose profile image
José Pablo Ramírez Vargas

Well, people forcing the change from "master" to "main" did not get over it. Why should he?

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Image description

I sure love having my culture americansplained to me. Here's an idea: how about you stop bringing up other people's languages as an excuse to get upset about your own country's history?

The sooner people like you stop trying to make this an issue when it isn't, the quicker main can simply become the one and only name for the primary git branch, and the quicker we stop having to deal with competing standards.

So please, stop making software development worse for everyone, most of us have actual problems to solve and actual things to build, so this pointless bike shedding over political nonsense is an actual nuisance to us.


Ranfom fact: most of Europe doesn't speak English. Most of us don't even have the word "master". Germany sure doesn't. Our bakers get a Meisterbrief, not a "master's certificate". In Spain we call teachers "maestro", not "master".

Collapse
 
janmpeterka profile image
Jan Peterka

I would love maestro be default! so poetic.

Collapse
 
codeawareness profile image
Mark Vasile

This ^^

And also, the master-slave architecture and related concepts are targeted for change, not just a github branch. The word "slave" should not appear anywhere in our tech.

Side-note: beware, the AI overlords can really do some damage by being trained on this kind of stuff.

Collapse
 
janmpeterka profile image
Jan Peterka

I would argue that other names actually communicate the meaning better:

  • production - as a branch/code that lives in production
  • main - as branch that all other branches merge into

I personally took master as a given, but I don't think that it easily, clearly conveys the meaning.

So, even when we forget all the other reasons why master may not be great name (as it currently has more meaning and associations), I believe that using production or main makes things more understandable.

Of course, any change has its costs. Personally, I had little trouble when our projects changed to main - we changed defaults in few places, and that's it.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

I personally like main when it's both the primary development branch and also generally production-ready.

When those are split, I find it better to avoid confusion by not having a main branch and instead splitting it into development and production.

Collapse
 
dan_maroff profile image
Dan Maroff

Correct me if I’m wrong but what I think really bothers you is that political correctness was responsible for the name change from master to main.

The decision to change the default branch of a git repository from master to main for that reason was just plain idiotic in my opinion and made zero sense. In other fields such as auto repair, you won’t see the master cylinder being renamed to main cylinder to make mechanics “feel better” about themselves. I’ve been in the software business since the late 90s and I’ve never seen this kind of cultural weirdness in the industry until recently. Now, with all that being said, master or main it really doesn’t matter at this point. Main works for fine me.

Collapse
 
janmpeterka profile image
Jan Peterka • Edited

The decision to change the default branch of a git repository from master to main

Some people made some desicions about their products/tools - Github changed default (but you can always choose any other), same with git, and that's all. You can rename your branch as you like.

Edit: I'm sorry, rereading this I realize that you are pointing only at the change in git project, I previously read it in more general view. I edited my post accordingly.

Collapse
 
dan_maroff profile image
Dan Maroff

Read carefully what I posted above. I never mentioned anyone was“forced”. When you create a new repository git now creates the primary branch as main instead of master. Why? Straight from the horses mouth …

“Both Conservancy and the Git project are aware that the initial branch name, ‘master’, is offensive to some people and we empathize with those hurt by the use of that term.”

Thread Thread
 
janmpeterka profile image
Jan Peterka

I'm sorry if my reaction sounded as if you said forced, I was just poining to the fact that all that happened is that open source project decided to change their default, and they every right to do so, no matter what is their reasoning.

At the same time, I do think that if you can change something to empathize with others without harming others, it's pretty reasonable thing to do.

Thread Thread
 
dan_maroff profile image
Dan Maroff

No worries, these kinds of discussions are healthy. I do agree that changing something without harming others is very reasonable. But from a practical standpoint, which is what we were supposed to be as developers, practical … this change made zero concrete difference to anyone’s lives in reality. It’s just a pat on the back move without any real sacrifice from GitHub. Put it this way, I can’t imagine under privileged people thanking GitHub for improving their lives. Silly stuff in my opinion. But that’s just my opinion

Collapse
 
potyoma profile image
potyoma

your "remember" block convinces that using "main" is way more convenient. it just describes itself while you need a whole article to explain what's under this "master" naming 🤷‍♂️