Hacker News new | ask | show | jobs
Set the default branch for newly-created repositories (github.blog)
28 points by jeamland 2125 days ago
5 comments

Key highlight:

> On October 1, 2020, if you haven't changed the default branch for new repositories for your user, organization, or enterprise, it will automatically change from master to main. You can opt out of this change at any time

To add emphasis to this: they changed the default branch name for new repositories.

You can opt-out of this change of the default. I don't know why I'd read that as changing existing repositories unless opted out.

Why not 'trunk'? It's a tree after all... there are 'branches'... SVN got it right.
Aside from the fact that `main` is pretty straightforward for people new to git, one huge benefit is that autocorrect for `ma` still works.
I've been in software since I was a teen, and this comment finally made me realize what "trunk" was actually supposed to mean before Git took over.

https://xkcd.com/1053/

As a non-native English speaker I never connected SVN's trunk with the concept of a tree from which branches grow. I mean, I knew of this meaning of the word trunk but I never thought of it in this context. I was more familiar with the other meanings, the long body part on the elephant and the storage compartment on a car.
For some reason I'd associated it with trunk, a word for the human torso.
My guess is because "Main" was used in Microsoft's TFS.
It's just like some politicians - destroying anything the predecessor created, no matter how good it is.
Pretty easy to opt-in. I also used Scott Hanselman's guide to change existing repos from master to main.

https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBra...

I don’t know if it’s because I’m on my phone but I can’t opt out?

Edit: oh I miss read. Thought this affected existing repos.

Opted in for new repos.

Clicking "change default branch name now" just opens a form to change it, thats how you opt out by typing master in that form. It's not super clear.
As a secondary developer, this offensive to me. Now I'll have to work on a branch named after the main developer, reminding me every day that it's THEIR project and I'm just a code monkey.