3 ms·
The name 'main' feels overloaded, just like naming the default branch 'default' or 'development', with the risk of "Who's on first?" confusion, especially when
by ehfeng 6y ago
The name 'main' feels overloaded, just like naming the default branch 'default' or 'development', with the risk of "Who's on first?" confusion, especially when branching off branches.
"What branch are you on?"
"I branched off the main development branch for this fix."
"Like...the `main` main branch or the main branch for the feature?"
I like redis' rename of their default branch to `unstable`. Just like commits are tagged with the release numbers, the latest code that isn't yet versioned is by default 'unstable'. If the industry as a whole is going to make this change, I would prefer we choose a name that can be unambiguously referenced in conversation.
- Analemma_ 6y agoWe use "mainline" instead. Same meaning, but it's a sufficiently uncommon word that there's little chance of ambiguity; it's very clear you're referring to a git branch.
- stock_toaster 6y agofhtagn - Where bugs wait sleeping.
- hn_throwaway_99 6y ago> If the industry as a whole is going to make this change, I would prefer we choose a name that can be unambiguously referenced in conversation. It that case, though, we would name our default branch "stable". We don't allow pushes to master unless everything has passed our full test suite. I'm not sure if it's a good or bad thing to have the development model hardcoded into the name of the default branch - I've certainly worked in long-lived repositories where we've changed the model over time.
- ehfeng 6y agoSure. I don't know if 'unstable' is the best name for everyone, but if the industry decides to spend the engineering time to rename default branches, we shouldn't be just be switching to the first synonym in the thesaurus, but a word that's actually more fitting than 'master'. 'mastering' is an artifact of vinyl and boxed software. Now that a lot of software is continuously tested and shipped, 'master' is not the right word for those processes. Even if you're shipping on-premise software, there rarely is a single 'master' copy anymore. https://en.wikipedia.org/wiki/Mastering_(audio) https://en.wikipedia.org/wiki/Mastering_(audio) As a side note, I've seen people try this, but there is no amount of testing that can guarantee stability. So, 'stable' feels like a false promise. Also, in the event of a bug causing downtime, _someone_ always has the ability to push directly to master and it's always possible that a fix might break a new commit's tests, even if it fixes the downtime.
- akatom 6y ago> As a side note, I've seen people try this, but there is no amount of testing that can guarantee stability. So, 'stable' feels like a false promise. Which, by the same argument, makes all branches unstable. Why would you want to name, arguably the least unstable branch in the mentioned scenario - unstable?
- Yetanfou 6y ago[only ever so slightly tongue-in-cheek] May I suggest a name for that branch which does not conflict with other uses and is generally understood by most developers? master Merriam-Webster gives several definitions for this word, one of which seems to fit this purpose very well indeed: (noun) an original from which copies can be made, especially: a master recording (such as a magnetic tape), (adjective) being or relating to a master from which duplicates are made, (verb) to produce a master recording of (something, such as a musical rendition) You can use this one-liner to rename your confusingly-named default branch: $ git branch -m main master $ git status On branch master