Hacker News new | ask | show | jobs
by bhaak 2105 days ago
I don‘t mind renaming the default branch.

But I’ll see many tools breaking or bugs surfacing because they can’t find the master branch.

One repository I used didn’t have a “master” branch but a “Master” branch. That was annoying.

Git doesn’t have a concept of a main branch. Maybe we will get that now as a result of GitHub’s change.

2 comments

The has never been a guarantee that the main branch is called "master". No tool should've been depending on the name of the main branch.
You are technically correct.

In reality though you can't expect programmers to code for eventualities that occur only in extremely rare cases (until now).

It's less rare than you think. Lots of repos use "develop", or "trunk" as their default, for instance.
Yes, many repositories use something else than "master" as their main development branch.

But how many of those don't have a "master" branch at all?

main seems like a better word overall, though not to be confused with main.go.
I would have preferred "default" as Mercurial does it.

"main" suggests it is the main branch under development whereas "default" doesn't as clearly.

But both terms are better than "master" if we disregard the weight a bad default name has gotten after years of continued use.