5 ms·
I also wish we could call it the "master" branch, renaming the primary branch to "main" is just pointless. But it's simply less risky and less work to just cal
by jopsen 4y ago
I also wish we could call it the "master" branch, renaming the primary branch to "main" is just pointless.
But it's simply less risky and less work to just call it "main".
It doesn't matter, and nobody gains anything from calling it "main" -- but if we call it "master" someone might get offended or waste my time arguing over it.
There is no incentive to insist calling it "master". So similarly, I guess we'll end up calling you "photonically disadvantaged" :)
Or maybe we can give it a positive spin and call it "darkness unimpaired"?
(Just kidding of course)
- skissane 4y agoSometimes you end up with a random mishmash of repos, some with the default branch called "master", others with it called "main", and then a handful with something else altogether (e.g. "develop"). Someone pushes for a massive "master=>main" rename – but once you get "master" baked into umpteen dozen ultra-complex CI/CD/testing pipelines, etc, it takes a lot of time to change them all and deal with all the fiddly breakage that results. So people do the rename for brand-new projects, and some of the low-hanging fruit of the existing ones, but the "too obscure" or "too-big-to-deal-with" existing projects get put off indefinitely. And then you are constantly scratching my head trying to remember which one this repo is. Even worse, a few repos someone creates a new "main" branch but keeps an old outdated "master" branch around just to confuse people. Even if your organisation has been so diligent as to finish off the rename everywhere, sooner or later you need to make changes to some open source project you are using which hasn't. What Git really needs, is some kind of "branch alias" feature. Some config setting like "branch_alias.main=master", and then I could always write "git checkout main", and it would checkout "main" if that exists, and "master" if it didn't (and vice versa). That would solve it in most cases – except for the rarer "we decided to use neither main nor master" and "we made a new main branch but kept an outdated master branch hanging around".
- faeriechangling 4y agoAs a rule, I don’t complain about changes in language that make things more terse or clear. Main is better than master.
- zzo38computer 4y agoYou can use whatever branch name you want. I think that it is probably not necessary or helpful to rename branches in existing repositories, but you can do that if it is helpful for what you are doing. If you upload a repository to GitHub, you can use whatever default branch name it already has with no problem. I know because I did upload one that uses "trunk" as the default branch name, and it did not cause any problem. (I used "trunk" as the default branch name because it is a mirror of a fossil repository which uses "trunk" as the default branch name.) (And, someone does get a minor benefit to call it "main"; it is two letters shorter than "master". Of course, that is minor, but it isn't quite nothing.)