Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm a bit late to the game, but I don't understand what this fuss is all about, from a technical point of view. I just created a git repo this morning and the default branch was named "master" (using the git command line). Then I pushed it to github to make it visible, as I have done several times before. The command line instructions at the "new repository" interface on github suggest changing the branch name to main, but I did not do that (just for trying) and now I have a brand new github repository whose branch is named "master". Basically github allows to name your branches however you like. The example instructions suggest that you rename your master branch to "main", by running this code on your command line:

    git branch -M main
But that is all. You can name it "trunk" if you want, for all that matter.

Now, I think that the whole github renaming thing is a bit ridiculous and probably a faux pas on their part. But the people complaining about "the great rename" sound even more ridiculous: as far as I can see, there's no rename, just a stupid modification of the initialization instructions that suggest that users rename their branch. All that fuss for the damn "git branch -M" line?



Haven't you thought about how trunk is offensive to people who have been kidnapped?


A lot of places will have extra effort in their CI/CD pipelines, too. I know, I know, commands like the following exist:

    grep -rl master | sed -ie "s/master/main/g"
but there's always going to be bugs or whatever come out of it, and also.. this misses the point of the article. It's a hollow virtue signal. It does literally nothing to help the cause it proclaims to help, yet it requires some effort from well.. everyone. It is the definitive example of a waste of time, al be it not much per instance, but some time is wasted.


My point is that you do not need to follow github's suggestion and rename your branch to "main". It seems to me that github's "change" is only a suggestion in their instructions to create a new repository. They do not rename your branches nor force a name to you. You get to chose the name of your branches, and the default name for the git program is still "master".


Which is still an empty gesture, that is still leading to wasted time.

FYI github's repo creation tool now defaults to main. A lot of orgs use this tool because they will also use repo templates. I know git, the program, is still defaulting to master.


> FYI github's repo creation tool

What is this tool? I always used github by pushing my locally-created repos to it, and this procedure still creates a "master" branch. I was not aware that there are other ways to use github, thus my surprise at the exaltation. I guess people who still use "plain git" are unaffected by the renaming of the default branch in github (whatever that means).



So, in that page, after you enter the repo name, three options appear.

1. Start the repository by creating new file: it opens a github text editor. I never used this option (what kind of savage uses github's text editor???), but to be fair it creates a default branch named "main"

2. Create a new repository from the command line: run git init, etc. You get to choose the branch name, then push it to github.

3. Push your existing local repository to github. It will get whateber branch name it already had, probably "master".

So the only people affected by the change are those who use github's text editor and chose the first option. I guess not many people do that? For the most common options you get to chose the name of the branch, that by default is "master" (not that there's anything wrong with that).


Not if you want to use a repository template.

Also we can argue until the cows come home about how little effort is actually involved. It could literally be a single click and it's still all still by-the-by. This is an empty virtue signal doing nothing - repeat nothing - to help the inclusion of minorities.


Sure, the name change was a stupid move in the first place. But as stupid moves go, this one fortunately does not affect my life at all (and that of most github users I guess).



The name change, which despite its being easy for you, will cause confusion and higher barriers-to-entry to new devs who will need to sort out older tutorials and manuals from new ones. This is but one foreseeable consequence among other potentially unintended and unforseen consequences.

This because an exceedingly tiny group of people at the best, most charitable interpretation of their motives, wilfully misapprehend that 'master' refers to more than their narrow concerns.


Sure, it’s fine and easy if you’re starting a project today. But if you have any build or deployment automation that interacts with git repos for existing projects it will be broken by the change.


But they did not rename any existing repositories (that would be in very bad taste!). Such an automatic renaming would possibly break a lot of scripts, but this is not what is happening. All old repositories still have their branch names intact. The new repositories can have whatever name you choose.

What does "the change" actually do? Is it just in the "new repository" instructions or is there some automated process that may fail? Maybe I'm missing a way to create github repositories besides the "New" button on your user page?


Existing projects are impacted by a changed default for new repositories how?


That doesn't really make sense? If you have existing git repos they will still have a branch called master.

GitHub did not go into existing repositories and change the names of existing branches.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: