Hacker News new | past | comments | ask | show | jobs | submit login

I wonder about which primary branch naming convention they’ll arrive at. “primary” is my personal favorite ;)



Github has said the most popular one across all their repos is `main`, and that's what they'll be going with themselves.

(Source: https://github.com/github/renaming)


I personally hope this won't catch on because some third party library still expect master to be the default branch. When main is used, I have to monkeypatch some script I use to work aroud it.

edit: I fixed the script to use branch [0] instead of branch master (using GitPython).


Maybe you can fork them and submit a patch with the changes fixing it. :)


At Elementary we've adopted `latest` as it tracks nicely with the bleeding-edge tag for Docker containers which we don't have control over. This way, when we build/deploy containers off of the `latest` branch there's an equivalent tag on our DockerHub repos.

https://github.com/elementary-robotics/atom


Hmm, not sure about "latest", as almost always, the master/primary/whatever branch is not actually the latest code, but the latest "production ready" code.


I saw somebody on Twitter call theirs "canon", which I've really taken a liking to. It fits nicely in regular speech too :D


Is the most recent commit on this main branch called "HEADCANON"?


I use, and prefer "trunk" since I rarely use branches, but "canon" might change my mind.


I've been debating "mast" as it sort of evokes "trunk" in an amusing seafaring sort of way, and partly for the same reason a lot people like "main" because their muscle memory is "ma<TAB>". For several reasons my muscle memory at this point is "mast<TAB>", so "mast" is even a slight improvement over my muscle memory.

But I'm not sure I'd get that much interest from other people to use "mast", it might just be something in my own projects.


I've also been debating just calling it "default" since we always refer to it as the default branch anyway.


Useful to know: the linked GitLab documentation points out several flaws with "default" as the name for a branch, in particular the cognitive association with financial default (a negative circumstance), which would make internationalization hard and while not as terrible an association and history as "master" still a bad association that now I've thought about it I cannot stop thinking about.


I think quaid would be good, you know because of Randy Quaid and also because of Total Recall


Canon is excellent, but I fear it wouldn't catch on due to its religious origins / connotations.


I can appreciate that "canon" is used in religious contexts, but its meaning and origin go back further than that. Wiktionary (hardly the best source, I know) lists three secular meanings before the religious ones begin. The most relevant is this one:

> A group of literary works that are generally accepted as representing a field.

Also, the coinage "fanon" (as in derivative works by a fanbase) comes directly from the treatment of the source material as "canonical". (Frankly, "canonical" is the best argument I can make for "canon".)


> but its meaning and origin go back further than that

master/slave goes back to Mesopotamia, 4 thousands years ago and was used to describe the relationship between men and gods

> Man was believed to have been created to serve the gods, or perhaps wait on them: the god is lord or master (belu) and man is servant or slave (ardu)

I guess being that old is not good enough nowadays


But git doesn't use master/slave (noun). It uses master as an adjective ("master branch"). Think cassettes and vinyl records or "master boot record". It means being the definitive source of truth and has been used in that form for centuries [citation needed, but I don't remember where I read it].

This isn't just an instance of "not old enough", it's an instance of it not even being the same word, so I guess you just can't win this...



what are the religious origins/connotations? That various religions also have a canon and apocrypha?


As someone who learnt version control with Subversion, I'm hoping trunk will come back into fashion.


It's rather hard to type as it's switching hands a lot; both "master" and "main" are easier to type, and are also shorter (as least "main" would be an improvement in that sense; "primary" would be quite the regression IMO).


That is why the single handed "fred" branch shall be the beacon of all truth.

Until it is accused of being sexist, or too western.


Easily solved, keep it to the QWERTY home row and make it the "asdf" branch. Could even backronym it to something like All Saved Data Files, maybe.


As a lisp fan, I second this proposal.

https://common-lisp.net/project/asdf/


How about just "fed"?


I renamed all mine to 'senpai'.


alias notice_me='git pull'


Wouldn't that be a better alias for `gh pr create`?


"Senpai" means senior/superior (e.g., "Senpai Dev"). A better honorific would be "dono".


I think most important thing is not which branch name we chose, it's that we all chose completely different ones. I'm going for "principal".


Probably the ubiquitous "master".


It's the ubiquitous "master" that everyone is trying to get rid of. There are details in several of the linked articles. TL/DR: The master/slave analogy is problematic and lots of projects have decided we don't need that terminology around any more, when we can pick less problematic names easily (easier now that there is a config option for it without needing to create a full git init template).


IMHO the only problem is what people wanna see in words.

master/slave has been with us since forever (https://news.ycombinator.com/item?id=23969906) and describes a relationship between two entities where one is the controller and the other is controlled, in many religions (including the most popular one) there is still a master God (or more than one) and believers are slave to God (with the capital G)

But in Git there is simply a "master" branch, there is no master/slave relationship, there is no hierarchy enforced, branches are just copies that diverged from the master copy, master as in master recording or "the source from which all copies will be produced"

I honestly have a hard time understanding what's problematic with it.


Americans have issues. A lot of issues to be honest. Add to the mix their fervor about what they think is right with their utter disregard about what the rest of the world has to say about it, and you will get an interesting recipe for neocolonialism.


Not all Americans, just a very passionate, vocal subset of Americans


Bitkeeper, which early git developers were familiar with, did use master in a master/slave relationship. While git does not enforce such "hierarchy", there remains an association (both in how we use the word outside of the context of git as well as historically in how the word was used by predecessor SCSes).

> master/slave has been with us since forever

"Tradition" or "we've always done it that way" is not a great excuse, especially when part of the problem is systemic papercuts. It's not surprising that systemic issues rely a lot on "tradition" to do their dirty work.

Whether or not you agree with the particular etymology/association being questioned, the very point of questioning it is whether or not this "tradition" is worth the pain of systemic papercuts. We've got a lot of other useful words, we don't have to keep using ones that cause papercuts just because of "tradition" (whether or not you personally suffer from those papercuts).


> especially when part of the problem is systemic papercuts

I'm sorry for slavery in US, but slavery in US is hardly the only example of slavery in history.

master/slave describes more than just a hundred years of slavery in United States

It also describes thousands of years of religious beliefs, for example.

> the very point of questioning it is whether or not this "tradition" is worth the pain of systemic papercuts

Not to sound harsh, but 5 billion people are ok with it.

It's a linguistic problem for a small minority of the population that speaks English as a native language and super charge words meaning.

Take for example the word servomotor.

A servomotor is

> French servo-moteur, from Latin servus slave, servant + French -o- + moteur motor, from Latin motor one that moves

In Italian it is "servo motore", servo is the exact translation of slave.

Why is servomotor ok, why is "I'm a slave to Jesus" or "God is my master" ok, but master branch is not?

I'm simply curious of why some people can't let things go...


Paul Graham published an essay recently which describes these kind of people as "aggressively conventionally-minded": http://paulgraham.com/conformism.html

Essentially there are some people who will follow rules and trends without questioning them. Among those there are some who will actively seek to punish those who do not follow the rules.

This master/slave thing is a new rule born out of guilt and virtue signalling. This comes from the fact that some people see themselves as genuinely superior to others and this makes them uncomfortable. They virtue signal in an attempt to fight against this feeling, rather than just accepting what may be true, moving on, and continuing to be a good person. It's a phenomenon that has been observed in many contexts. The most vocal homophobes are often homosexual themselves. The most vocal religious devotees often have the strongest doubts.


> bitkeeper This was refuted by the person who named it- https://mobile.twitter.com/xpasky/status/1272280760280637441

This argument comes off as very condescending in a soft bigotry of low expectations-type of way, given there's nothing else within git that even hints to master being related to master-slave terminology.


In the rest of the world is not as problematic, as we associate master with teacher. But we are used to America forcing their culture down our throats. Like they did when tried to force down their hatred for the police on us. So, another one to the list. It would be nice if some day they tried to consider how the rest of the world sees things. For a change.


> In the rest of the world is not as problematic, as we associate master with teacher.

Every word has more than one association. The argument is not that every association for the word is negative, but that one association is extremely negative, and we have the ability to use words that have fewer negative associations, so why shouldn't we use words with fewer negative associations?

That extremely negative association certainly isn't unique to the American past either, and if you think you are immune you are likely ignoring your own past. It's maybe being promoted by Americans because Americans see it as a more recent part of their past, still are wary of scars left behind from it. (Though even that isn't uniquely American; South African Apartheid is another easy example of recent history.)


Ah, yes. The old “if you don’t think like me you are wrong.” We are also used to that condescending attitude. Very American. But, as surprising as may be, there are other cultures in this world. In mine, master is a word associated to teacher. You see the issue as more recent because it is happening right now. The scars are still bleeding. Maybe this is why you all overreact so much to simple words. To overcompensate.


I'm not claiming anyone is wrong, I did not say that anywhere, and I'm not forcing anything. I'm simply suggesting there are alternatives. It's not an American thing, and it isn't overcompensating for anything. I don't even feel that strongly about this. Clearly a lot of people do. It tells me a lot more about this thread in the way it was downvoted where I was simply trying to explain the issue, it's history, and the options available and a lot of people apparently brought emotions to the discussion that I do not understand where they came from.

Do whatever you like. I'm not telling you what to do. I'm not telling anyone what to do. I was merely explaining the controversy. I give up. I do not understand what all this hate is about. I'm just the messenger, but I guess I can take all the shots.


What? Apartheid wasn't slavery. And since when do South Africans want to change the language to bury the past?


That’s not the type of master that’s it’s referring to. But I’m not sure etymology really matters I guess.


There's a lot of back and forth on the discussion, and summaries are included in the tops of almost all of the linked articles. In general, the name "master" branch was commonly used in proprietary git predecessor BitKeeper which almost all of the early git developers were familiar with [1] and it did use master in a master/slave meaning. (It had a concept of "slave repositories".) While git has never had a concept of "slave branches" and the meaning may very well have meant to evoke one of the other etymologies, the word was "in the air" because of BitKeeper, which did intend it in a master/slave relationship, so git is guilty by association if not guilty by intent. Which is fine, no one is suggesting git is guilty by intent, they are simply suggesting it is time now to do what early git developers failed to do and question the association (both associations, using the word simply because it was a word commonly thrown around in tech up to that point, and in the association of master with chattel slavery).

[1] Bitkeeper was the SCS that the Linux kernel had been using up to that point, and whose dropping of free licenses to open source projects like the Linux kernel was the immediate cause of the creation of both git and Mercurial.


I miss trunk.


I’ve migrated several repositories from mercurial, and didn’t bother to rename “default”. It works perfectly fine and no one is ever confused.


I've seen `main` being used quite often.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: