Which git branch are you on? Main or master

top 97 comments

sorted by: hot top controversial new old
[–] 116 points 1 year ago

main in the streets, master in the sheets

  • source
  • [–] 104 points 1 year ago (5 children)
  • [–] 86 points 1 year ago (4 children)

    I get wanting to move away from "master," but why in the world didn't we use "trunk"

    It was already a standard name, and it fits "branches," etc.

  • source
  • hideshow 4 child comments
  • [–] 38 points 1 year ago* (last edited 1 year ago) (2 children)

    "trunk" is what it was called in SVN, too. Well, kind of. SVN didn't have a real concept of branching like Git does, but the main development would almost always happen in a root directory called "trunk".

    I'm not sure why Bitkeeper used "master", but that's why Git called it that (Git was originally built as a replacement for Bitkeeper).

  • source
  • parent
  • hideshow 2 child comments
  • [–] 82 points 1 year ago* (8 children)

    I personally don't think the word "master" should be considered offensive - my wife has a master's degree in deaf education - but I've switched to "main" because that seems to be the convention now and it really doesn't have to be an issue.

  • source
  • hideshow 8 child comments
  • [–] 33 points 1 year ago (4 children)

    There's no "slave" convention in git so I'm not sure how it can be considered an issue (I get that drives being master and slave is a bit icky). But then, what is it a master of?

    As others have said, "trunk" would have been a more sensible replacement.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 29 points 1 year ago* (2 children)

    It's a master the same way that an original recording (the final version before mass reproduction) is called a master; mixing and processing the raw media clips into such a recording is called mastering. It's a convention that has existed long before computers were a thing.

  • source
  • parent
  • hideshow 2 child comments
  • [+] -20 points 1 year ago* (last edited 1 year ago) (1 child)
  • [–] 9 points 1 year ago*

    But then, what is it a master of?

    It's about master copy. You have a master copy, and you have the development copies that are a copy of the master which is where you make your changes.

    If i had to guess, the problem is that people don't know how to use git and develop in the master

  • source
  • parent
  • [–] 5 points 1 year ago* (1 child)

    Honest question. I cannot see if you are being serious here. If this is a real thing, is it because of US slavery history? No way you are saying your wife has a main degree in deaf education?

  • source
  • parent
  • hideshow 1 child comment
  • [–] 40 points 1 year ago (1 child)
  • [–] 38 points 1 year ago (2 children)

    No one commits to trunk anymore....

  • source
  • hideshow 2 child comments
  • [–] 30 points 1 year ago

    Whatever the repo is setup with.

  • source
  • [–] 24 points 1 year ago (1 child)
  • [–] [M] 18 points 1 year ago*

    Locking comments. Had a good run, over half a day, but this was always headed for an emotional train wreck.

  • source
  • [–] 18 points 1 year ago (2 children)

    I don't care which one you use, just don't change it once it's established. So many legacy Yocto projects got broken cause open source libraries changed their branch names.

  • source
  • hideshow 2 child comments
  • [–] 10 points 1 year ago (1 child)

    I don’t care which one you use, just don’t change it once it’s established. So many legacy Yocto projects got broken cause open source libraries changed their branch names.

    This was one of the arguments when the renaming was first proposed. "Just rename it, it won't break anything! It's only racists that want to keep the name!"

    Sure, except for all the CI/CD scripts, release scripts, etc that all have "master" there and are now broken.

    I know of a company that their entire CI pipeline was broken overnight because some "helpful" person renamed the branch to master but didn't bother checking out their pipelines...

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 1 year ago

    I know of a company that their entire CI pipeline was broken overnight because some β€œhelpful” person renamed the branch to master but didn’t bother checking out their pipelines

    Sounds like the sort of simpleton that would find "master" offensive.

  • source
  • parent
  • [–] 33 points 1 year ago (6 children)

    The default branch for some projects is "production" since CD deploys on pushing to that branch

    For new projects, main. My thought is that even if master is not offensive, since the industry has generally made the change, the only reason to stick with master is stubbornness or hating political correctness, neither of which aligns with my self-view so I'll use main and move on.

    In general if people are genuinely hurt by the use of some words, I'm not sadistic so I'll avoid using them. From my perspective morality is the pursuit of the reduction of suffering, even if that suffering is internal.

  • source
  • hideshow 6 child comments
  • [+] 18 points 1 year ago (3 children)
  • [–] 7 points 1 year ago (1 child)

    I mean, the problem people have with it isn't a name change or improving inclusivity. It's the fact that they feel like they are being bullied into doing something they had no input into in the name of inclusivity. What pisses people off is how, as soon as someone says "x" isn't maximally inclusive of some marginalized group, everyone has to change or else get called a categorically bad person.

    For example, suppose you have a red hat that you enjoy wearing. You got it at wafflefest a decade ago, and it says "I <3 Waffles". Then one day, your boss sends out an email that no more red hats are allowed in the office because it might create an unwelcoming environment. You will, of course, be pissed off. Not because you can't wear your waffle hat anymore, but because your boss feels entitled to control the minutiae of you life like this. You'll think to yourself "fuck that guy, and fuck whoever brought up banning red hats in some corporate board room 1000 miles away. This is bullshit!"

    People like their autonomy, and don't like being controlled. Doesn't matter if it is in the name of increased corporate profits, or inclusivity, or saving the bees, or dying of lung cancer. They don't care about the name of their git branch - they care that they feel like they are being forced to change it.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 5 points 1 year ago

    That analogy doesn't really apply though. The decision to change master to main was a collective one, not made by "some corporate board room 1000 miles away". It may feel like that's how it went down because you only noticed when GitHub changed their defaults or whatever, but that decision was not made in a vacuum, it was the result of lots of people saying "hey, this is a problem, let's fix it" for a long time before any actions were taken.

  • source
  • parent
  • [–] 2 points 1 year ago

    No one is offended by that word, at some point we need to stop wasting time on pointless debates and move on. If I start tweeting that I find "main" offensive are we going to have to find another name?

  • source
  • parent
  • [–] 0 points 1 year ago

    Do you have any evidence that "the industry" has made the change? My personal experience says the opposite. Unless you mean "new repositories use the new default name" which says more about people simply not caring rather than anything else.

  • source
  • parent
  • [–] 0 points 1 year ago

    In general if people are genuinely hurt by the use of some words, I’m not sadistic so I’ll avoid using them

    That's a sane position. Only issue is that this have nothing to do with the question, and the people that were the most vocal about this issue had no business talking about it in the first place.

    Ultimately, git is flexible; beyond some potential local and shared automation, anyone can call their local branches however they want, regardless of other and servers. Personally, changing years of habits and tooling (that probably should not have hardcoded some names in the first place) is not worth following a change proposed by misled people.

  • source
  • parent
  • load more comments (-1 replies)
    [–] 15 points 1 year ago (1 child)
  • [–] 29 points 1 year ago

    I always rename my branch to main. Because it's shorter? That's the extent of my reasoning. Thanks for coming to my ted talk.

  • source
  • [–] 24 points 1 year ago (1 child)

    No gods no master branches

  • source
  • hideshow 1 child comment
  • [–] 11 points 1 year ago

    I'm naming my production branch goshujin-sama

  • source
  • [–] 21 points 1 year ago
    [–] 9 points 1 year ago (2 children)

    "Obey your master! Master!"

  • source
  • hideshow 2 child comments
  • [–] 44 points 1 year ago (6 children)

    Main.

    Don't get me wrong, the whole debate is Microsoft just being performative (why not use your vast wealth to actually help people?). But honestly, putting the debate aside, "main" is just a clearer and more intuitive name.

  • source
  • hideshow 6 child comments
  • [–] 9 points 1 year ago* (last edited 1 year ago) (5 children)

    I think it's the same with blacklist/whitelist -> blocklist/allowlist. It allowlist/blocklist actually says what it does in the name without using the idea of racism and white supremacy. I wish more software would just use these terms by default. (maybe some aliases for the old names)

  • source
  • parent
  • hideshow 5 child comments
  • [–] 22 points 1 year ago (1 child)

    The problem is that "master" means several things. There is Masters degree, master sword, master blacksmith, master copy, all of which have absolutely nothing to do with master / slave.

    The Git "master" terminology came from "master copy". There's an email thread online where someone asked Linus Torvalds the origin and this is what he said.

    The whole thing about it being about master / slave was some random uneducated person guessing, and they were wrong.

    I agree that main is simpler and clearer, but it has nothing to do with racism.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 0 points 1 year ago

    Clarification: the "it" in the second sentence was referring to "blocklist/allowlist" specifically, not "main"

    Of course the name "master" in the git context may mean something completely different from slavery or similar, but the possibility of misinterpretation is IMO another (maybe small) reason that new projects should consider using the clear and unambiguous "main" instead of "master".

  • source
  • parent
  • [–] 15 points 1 year ago* (2 children)

    It actually says what it does in the name without using the idea of racism and white supremacy.

    The origin of the words blacklist and whitelist doesn't have anything to do with racism. If someone looks around and only sees racism, then who is the racist?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 1 year ago (1 child)

    Even if the word's origins aren't racism, I hope you can see why having a blacklist with "bad" things on it that won't be allowed and a whitelist with "good" things that are allowed maybe isn't the friendliest terminology. (especially when there are more intuitive names available that avoid this problem)

  • source
  • parent
  • hideshow 1 child comment
  • [–] 8 points 1 year ago* (last edited 1 year ago)

    Some would argue it's culturally imperialistic to impose US cultural sensitivities on the rest of the international English community. Wasn't the inventor of git Finnish? The entire world uses git.

  • source
  • parent
  • [–] 8 points 1 year ago

    both. but majority are master cause that's the default and I'm too lazy to change nor do I really care.

  • source
  • [–] 8 points 1 year ago (3 children)

    Last place of employment had develop as the default branch. Actually quite liked it. (There also was a main branch, which only got merged into as part of the release flow, so might as well have called it release, I suppose).

    Anyway, IMO it communicated "volatile and subject to change" a lot more clearly than things like "head of main" etc

  • source
  • hideshow 3 child comments
  • load more comments (1 reply)
    [–] 54 points 1 year ago (2 children)

    Just use main. I'm not bothered by either, but I'm not in the demographic that would be bothered by master, so I use main and STFU. It takes way less effort to switch to main (if you haven't already) than to come up with all this rhetoric about why master shouldn't trigger people.

  • source
  • hideshow 2 child comments
  • [–] 1 point 1 year ago

    That's why we switched, on both closed- and open-source projects. There's just no winning an argument that puts you on the same side as racists.

    At one point I was considering how, if someone asked on one of our public repos, I'd say "no" but at the same time post a receipt for a donation to the NAACP just to prove I wasn't racist. Thankfully I realized how stupid an idea that was before it came to that.

    Performative wokeness is a cancer, man. Did any of this arguing and vitriol actually help any marginalized group in STEM? I really fucking doubt it.

  • source
  • parent
  • [–] 86 points 1 year ago* (last edited 1 year ago) (8 children)

    It's a retroactive bastardization of the word based on one particular culture's one particular interpretation of it (master being, apparently, a slaveowner) that ignores both the much earlier meanings of master artisan or master craftsman (as opposed to journeyman and apprentice) and masterpiece (through which an artisan is recognised as a master), and the modern meaning of a master copy (like a master record in disc printing).

    This isn't like replacing the "master and slave" terminology with regard to connected devices. That one was warranted because it was often inaccurate and confusing. But forcing the adoption of main instead of master feels like someone got offended on someone else's behalf because a word looked superficially like that other bad word, and apparently we can't have an understanding that goes deeper than what letters it's made up of.

    Amerika ist wunderbar. This is an --initial-branch=master household.

  • source
  • hideshow 8 child comments
  • [–] 6 points 1 year ago

    This isn't like replacing the "master and slave" terminology

    I struggle with SPI (serial peripheral interface). Two of the pins are MOSI/MISO (master-out-slave-in and vice versa). There are some alternative namings, but this one seems especially ingrained in embedded dev

  • source
  • parent
  • [–] 21 points 1 year ago (4 children)

    regardless of that, it's never inconvenienced me and it's still a net gain in readability, since main actually means what it means. have my shell scripts set up to use either one for any repo I'm in automatically.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 18 points 1 year ago* (last edited 1 year ago) (3 children)

    Honestly it's not even about convenience. As far as breaking conventions go, this one has none-to-minimal impact -- existing master branches won't suddenly become invalid. But it's yet another instance of a subset of a subset of a subset of users getting to enforce their sensibilities for superficial reasons, and ultimately with zero effect regarding the cause they claim to represent; cultural and linguistic differences be damned.

    I'd love to be more specific, but I don't want the comments to turn into a warzone.

    And don't pretend like master doesn't mean what it means.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 17 points 1 year ago (1 child)

    And don't pretend like master doesn't mean what it means.

    Claiming that master on github stems from master recordings is not only disingenuous but also incorrect.

    As a FOSS alternative to BitKeeper, Git naturally reimplemented it's naming conventions as well - and because of the power of version control - we can actually check what the original meaning was derived from:

    We are then going to modify the file on both the master and slave repository and then merge the work.

    And yes I agree that GitHub just changing the name of the default branch while keeping their ICE contracts is performative as fuck - which imo means we should both boycott GitHub and use naming conventions that don't have a history related to one of the worst atrocities the global north has brought upon the world...

  • source
  • parent
  • hideshow 1 child comment
  • [–] 9 points 1 year ago* (last edited 1 year ago)

    I concede the point about the word's origin... not that I've seen anyone ever refer to a branch as a "slave", nor do I think that it's appropriate given that the branches are not subservient to the trunk/master/main/etc until one is merged into or rebased onto the other...

    I also wrote a whole-ass speech about the modern world's relation to the Atlantic slave trade and the guilt certain people are trying to inflict on everyone, but I know what the replies will be (we're just redditors by another name after all) and it's ultimately not a soapbox worth dying on. Anyway, my thesis is study history, learn its injustices, and learn how to do better effectively.

  • source
  • parent
  • [–] -3 points 1 year ago

    People: hey you should think about this a bit and consider changing it to have a small positive impact

    You: 🀬

    Nobody's forcing you to, nobody's yelling at you, if you don't do it it's not a massive deal, you're just yelling at clouds. Actually that's not entirely true; I'm yelling at you because of your absurd overreaction to the mere idea of being a little thoughtful.

    I don't know if you got it from media, or you heard about this movement and for some reason immediately jumped to "they're forcing us!", but you really need to do some self reflection on why you got it so wrong and why you were so quick to do this outburst.

  • source
  • parent
  • [–] 8 points 1 year ago

    At some point needlessly banning words just empowers bigots by letting them claim larger and larger parts of the vocabulary. Shouldn't we try to reclaim words instead, and deprive the words of their power? Just "banning" words, especially in cases such as this one when the connection to master/slave is pretty weak, actually increases the negative power of the words and I'd argue empowers people with malicious intent

  • source
  • parent
  • The real answer is whichever is easiest. If you've got a master branch and it's a pain to switch, then I wouldn't do it. If you've got a badass coder who is disturbed by the terminology, then I'd say to do it to keep the peace. It depends on the situation.

  • source
  • [–] 51 points 1 year ago (6 children)

    I can work with either, but I cannot and will not forgive any deliberate changes from main to master.

  • source
  • hideshow 6 child comments
  • [–] 37 points 1 year ago (4 children)

    If you have a main and a master branch in the same repo and you don't delete one at the very start of the project, God has abandoned the living bcz we're lost and he has forsaken all that is good in the world.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 16 points 1 year ago (3 children)

    I didn't mean both simultaneously in the same project, lol.

  • source
  • parent
  • hideshow 3 child comments
  • load more comments (-1 replies)
  • [+] 63 points 1 year ago (12 children)
  • [–] 47 points 1 year ago* (last edited 1 year ago) (3 children)

    My scrum master said that we need new tickets to update the git branches and pipelines to use main instead of master since master was a bad word.

    I asked him what his job title was again and there was a pause.

    Then he said we can't say that we are going to groom the code base anymore.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 6 points 1 year ago (5 children)

    Why master? main is much clearer

  • source
  • parent
  • hideshow 5 child comments
  • [–] 19 points 1 year ago*

    Why not change "walkie talkie" to "radio phone"? It is so much cleaner.

    Because change for the sake of change always brings more work than what it saves.

    Why change something that works and everyone recognizes it? Of course, if this debate was there when the standard was created...

  • source
  • parent
  • load more comments (-1 replies)
    load more comments
    view more: next β€Ί