Github Changes the Default Branch Name from ‘master’ to ‘main’

Image for post
Image for post

As I created a new repository on github and wanted to pull the remote branch to get the default files (LICENSE and README) to push after, I got the error that the remote branch doesn’t exist.

How could this be? I’ve been using git for 20 years!

I was annoyed to realize github had changed the default branch name from ‘master’ to ‘main’. The reason? Because ‘master’ references slavery!

What an atrocity! WTF is this PC culture? In the many years that I have been using git with github, not even once did I think about human slaves and masters.

As I got calm and went about my day and thought about it, I realized what an idiot I had been. Yes it is slightly inconvenient to accept this change. I’m going to rename ‘master’ to ‘main’ a few times before I get fully used to it. But that’s about it. I don’t really care if the default branch name is ‘master’, ‘main’, ‘foo’ or ‘bar’.

All I had to do was to rename my local branch name:

$ git branch -m master main

We humans are not comfortable with change. Every time facebook changes its layout, people go on a rage and two weeks later they get over it.

In the case for github, I support their change. Sure many (maybe most) developers don’t think about slavery at all when they user ‘master’. But some may have. Language is a means of communication and we have to be sensitive to others. Even if 1% of developers, probably the black community, are sensitive to the word, then it makes sense to change it. From a developer’s viewpoint, it doesn’t matter what the default name is.

And if you are so inclined to use the name ‘master’, you can still use it. Just the default branch is not named ‘master’ anymore. Tough life!

Written by

Software Engineer | Indie Game Developer | Founder of No Such Studio. Follow me to learn how to make video games with Unity. http://www.nosuchstudio.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store