SpaceCadet
Take a breath dude
Can you not please with the condescending language? Maybe you're the one who should take a breath and read my post calmly. Anyway, the guy above me asked, I gave an answer to cover all the bases.
The default branch name of git isn't that important to me either, I'll manage with main or master. But at the same time it does irk me especially since this kind of language policing has become an industry wide trend, and it's just a stupid thing done for stupid reasons. Am I still allowed to express why I find it stupid?
it’s trivial to change
It isn't as trivial as you make it out. I've already encountered repos where there was both a main and a master branch, both with different commits, because some developer got confused, and it was a nice mess to untangle. But hey, let's change some more stuff around for no good reason.
If there’s any chance it helps maintain a hostile workplace/industry
I can think of a lot of things that contribute to a hostile workplace, but the default branch name of git? Seriously? Even the people who pushed for this don't actually believe that themselves.
Why care about Master at all?
I've already explained all my reasons, but I'll reiterate. To summarize I basically have five main issues with it
-
The change was done in response to attempts at language policing and bullying by a vocal and militant minority. Giving into it is a form of appeasement towards an unreasonable demand.
-
The change retroactively modifies a terminology that was already agreed upon. Like, if git sprung into existence today, not many people would have an issue with it if they would call it main or trunk or primary from the get go. But that's not what happened. Git was released in 2005 and it used master terminology. As a consequence, many existing repositories also use master. Now when someone is working with branches, like doing merges or pull requests, they suddenly have to remember: oh in this repository it is main, but in that repository it is still master. Or they have go out of their way to modify decade old repositories, potentially breaking all kinds of behind the scenes CICD stuff. Or they have to go out of their way to revert the default on all systems that they're working on back to master. In any case, this change is a source of errors and wasted effort for zero net good.
-
It does no good in the real world other than making do-gooders feel good about themselves, and giving a capitalist entity some PR to appear more progressive than they are. We all still have masters, existing slaves are not freed, no historical wrongs of slavery or inequality are righted.
-
It's a misguided change in this case because the word master in this context doesn't even have a relationship to slavery. Just like a master degree you may hold, or a master key or a master recording of your favorite album have no bearing on slavery. Note that there are no "slave" branches in git.
-
Finally, in the case of git, master is simply more accurate than main because it carries a nuance (derivativeness) that main does not.
There’s no need for master terminology there
Nobody said there is a need, you could call it foo or bar and it would still work. It just that master more accurately describes what it is. Main for example does not describe a derivative relationship, master does.
Also, master in this context is totally unrelated to slavery so I could also just as easily say that there was no need to replace the existing terminology either. It doesn't solve any real world problems of historic or currently existing slavery, and it doesn't make anyone's life better. The only reasons why it was done were appeasement and virtue signalling.
Is it not the main working branch
No it is not. On large distributed projects for which git was designed, you typically don't directly work on main/master but you create a working branch to do your changes, and when they are ready you merge them to main/master.
There are many types of git workflows, but main/master usually contains the code that is deployed to production or the latest stable release and not some work in progress.
When you start a new project, do you open a new branch or create a whole new repository?
You have to define "project" for that.
- Is your project a change to existing code -> new branch, merge to main/master when done
- Is your project something new that stands entirely on its own? -> new repository
I’ve seen ‘Active / Passive’ used, that seems alright
That's not always an accurate description though.
Consider a redundant two node database system where the second node holds a mirrored copy of the first node. Typically, one node, let's call it node1, will accept reads and writes from clients and the other node, let's say node2, will only accept reads from clients but will also implement all writes it receives from node2. That's how they stay in sync.
In this scenario node2 is not "passive". It does perform work: it serves reads to clients, and it performs writes, but only the writes received from node1. You could say that node2 slavishly follows what node1 dictates and that node1 is authorative. Master/slave more accurately describes this than active/passive.
There’s plenty of alternative terms to use without borrowing terminology from sexual roleplay.
Do I have news for you ....
master over main
That one is the most stupid one too, because master in git doesn't even refer to a master/slave relationship. It refers to a different meaning of the word master, namely "an original from which copies can be made", as in master recording or master key. See 5b in the Merriam-Webster dictionary. And that's how it's used in git: any new branches are derived from master. Main just does not have the same nuance, because it does not imply a relationship between the branches, just that it's somehow more important than the others.
But of course, the real reason it was changed is because for companies like github it's easier to give in to the crazies who demand this than to fight them.
It's often due to the security department following outdated standards. Nowadays NIST recommends the following:
Verifiers SHOULD NOT impose other composition rules (e.g., requiring mixtures of different character types or prohibiting consecutively repeated characters) for memorized secrets. Verifiers SHOULD NOT require memorized secrets to be changed arbitrarily (e.g., periodically). However, verifiers SHALL force a change if there is evidence of compromise of the authenticator.
Source: https://pages.nist.gov/800-63-3/sp800-63b.html
That said, the company I work for violates all of the above rules ...
Ctrl + r to search previous commands
That's a readline thing by the way, so it doesn't just work in bash but also works with other cli applications that are compiled with readline support, for example virsh
, psql
, fdisk
, ...
Landgenoot bedoel je wellicht ;)
Reminds me of when I got into an argument with my English teacher in highschool. On a test we had to translate some words from Dutch to English, and she marked me down because I translated "aap" as "ape" intead of "monkey". I had to remind her that the movie "Planet of the Apes" exists.