r/programming • • Jun 14 '20

GitHub will no longer use the term 'master' as default branch because of negative association

https://twitter.com/natfriedman/status/1271253144442253312
3.3k Upvotes

2.4k comments sorted by

View all comments

Show parent comments

52

u/Farsyte Jun 14 '20

This depends on how they go.

1/ Maybe they are just going to allow people to designate a different branch as the default to check out. WAIT, THEY ALREADY DO THIS.

2/ Maybe they are going to allow people to switch. WAIT, WE CAN ALREADY DO THIS.

so that leaves, if they are actually doing anything,

3/ Renaming all the "master" branches in Github, breaking most* clones of most* repositories and most* continuous integration and continuous development system implementations ... ?

Not something that has been thought out. I suspect it was someone posting this for just long enough to get whatever positive PR value they can, then walking it back to get the upset folks calmed back down.

(* I suspect "most" is really "every" but surely someone has an example of a carefully crafted setup where they are proof against the sudden renaming of their most critical branch.)

91

u/kankyo Jun 14 '20

Or 4) when creating a repo via the web GUI they default to another name. This is by far the most likely. This won't break a lot.

14

u/Farsyte Jun 14 '20

So basically a change in the repo creation front end? No biggie then, anyone using tooling that depends on the main / trunk / golden / release / whatever branch vexing called master just keeps calling it that.

Irritated mode off 👍

-3

u/aniforprez Jun 14 '20

Yeah I don't understand why this wasn't part of their comment. Seems simple enough that they simply make a "main" branch instead of a "master" branch by default for new repos. Wouldn't break anything but it would be incredibly annoying

4

u/kankyo Jun 14 '20

At work we use "prod" anyway for many years. Always disliked master. Not that main is better.

5

u/aniforprez Jun 14 '20

We use master for the branch that stuff is always merged to and prod for stuff that is then manually deployed. master is always to staging and prod is to.. well production. This means all our master is our main branch

4

u/kankyo Jun 14 '20

We actually deploy a branch called "deploy" which is exactly the latest prod with successfull tests. The we can deploy prod in an emergency. It's a pretty great setup.

12

u/Raknarg Jun 14 '20

maybe they just change the defaults for future projects

6

u/Muvlon Jun 14 '20

I see another possibility:

4. They keep all the branches as they are, so git keeps working, but they rename "master" to "main" or something only in the web interface.

20

u/IceSentry Jun 14 '20

That's even worse. Imagine trying ro checkout main but it doesn't exist and now you can't checkout and don't know what the real branch name is.

1

u/carbonkid619 Jun 14 '20

Maybe they'd have some way of mirroring the master branch as main as well on all repos that dont have a main branch, then use main in all of their documentation going forward? This would still break some things, but not as much imo.

2

u/IceSentry Jun 15 '20

The only thing that wouldn't break everything is to only enforce it on new repos and even then it might break scripts that assume a master branch because it's the default.

1

u/Muvlon Jun 14 '20

Yeah. I don't think there is a non-crappy way to do this for existing repos. Perhaps they'll just change the default branch for new repos to "main"?

4

u/lionhart280 Jun 14 '20

I dont think theres any reason to expect github would sweepingly modify everyones existing repos.

3

u/lionhart280 Jun 14 '20

They are just going to make the default on new projects be called main, by default.

Not a big deal.

4

u/Quantumplation Jun 14 '20

Number 3 is the most ridiculous and extreme interpretation of this story. Seems like you're trying to be upset about this.

1

u/[deleted] Jun 15 '20

I suspect it was someone posting this for just long enough to get whatever positive PR value they can

Someone being the ceo of GitHub.

-12

u/[deleted] Jun 14 '20

I would argue that if your project, whether amateur or professional, relies on the master branch of some other project, then you really need to stop doing that anyway.

Any reasonable project will rely on a tagged release, which exists independent of the name of the default branch.

If someone renaming their master branch breaks something for you, then it was just a matter of time before something broke anyway.

0

u/[deleted] Jun 14 '20

[deleted]

1

u/Quantumplation Jun 14 '20

Amazing critique.

1

u/[deleted] Jun 14 '20

If someone renaming their master branch breaks something for you, then it was just a matter of time before something broke anyway.

welcome to the real world