So creating a new repo on GitHub, you get a set of getting started steps. They changed the default branchname to “main” from “master” due to its connotations with slavery.

When I create a new repo now, the initial getting started steps recommend creating a branch named “master” as opposed to “main” as it was a while ago.

It’s especially weird since the line git branch -M master is completely unnecessary, since git init still sets you up with a “master” branch.

Disclaimer: I have a bunch of private repos, and my default branchnames are pretty much all “master”.

Is this a recent change?

Edit: Mystery solved, my default branchname is “master”. Thanks bamboo@lemmy.blahaj.zone !

  • phcorcoran@lemmy.world
    link
    fedilink
    English
    arrow-up
    61
    ·
    edit-2
    18 hours ago

    (FYI I didn’t make this and I believe it’s fake but honestly it’s hard to tell)

  • InstallGentoo@lemmy.zip
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    16
    ·
    19 hours ago

    God I wish. The change to “main” was pointless and unnecessary. It’s almost like people want to find problems when there aren’t any.

    • FooBarrington@lemmy.world
      link
      fedilink
      English
      arrow-up
      15
      arrow-down
      4
      ·
      edit-2
      14 hours ago

      I like it, because it forced people not to assume master is the main branch. If something is common enough to almost be a standard, but it’s not actually a standard, it’s just waiting for disaster.

      These assumptions cause unnecessary breakage, but people will make them unless forced not to.

        • FooBarrington@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          arrow-down
          1
          ·
          6 hours ago

          And yet not everyone used to use master, so scripts kept breaking for no good reason.

          Either make it a standard, or stop assuming it’s a standard. De-facto isn’t good enough.

          • ryathal@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            1
            ·
            6 hours ago

            Having a magical standard fairy waive a wand isn’t going to fix scripts, or stop them from breaking.

            • FooBarrington@lemmy.world
              link
              fedilink
              English
              arrow-up
              1
              ·
              5 hours ago

              What? If there’s an actual standard, it will stop scripts from breaking, because the assumption that master is the main branch will always be true.

    • ℍ𝕂-𝟞𝟝@sopuli.xyzOP
      link
      fedilink
      English
      arrow-up
      25
      ·
      23 hours ago

      Well, that is embarassing. It’s master.

      I don’t remember setting this, but then again, I don’t remember a lot of things. Thanks!

    • GreenKnight23@lemmy.world
      link
      fedilink
      English
      arrow-up
      25
      arrow-down
      22
      ·
      21 hours ago

      is it though?

      I treat the master branch as the master record. it’s the branch all other branches are made from.

      calling it main is overly generic. main to what? the repo? the main feature being worked on? are there multiple mains like in mains voltages?

      master seems far more concise. when you think of it like a stateful record.

      plus all my pipelines are configured to use master. I would have to rewrite 70+ pipelines just to convert to main.

      not worth it.

      • normalexit@lemmy.world
        link
        fedilink
        English
        arrow-up
        11
        arrow-down
        2
        ·
        edit-2
        9 hours ago

        It’s just a word at the end of the day. To me “main” is literally a shorter word that means the same thing in my brain. It could be “trunk” or “release” or whatever else you’d like. “master” makes some people uneasy, so it seems like a simple solution to pick a different word.

        The development community talked, informally settled on main, and here we are. Anecdotally it took me more time to write this than to switch most of my projects over. I use GitHub actions and a simple find/replace for a word not otherwise commonly used was the ticket.

        I really don’t care what other people use at the end of the day. Discussing version control and branching strategies drains my life away. If it is difficult to switch, don’t, but if you start a new repo it is worth thinking about for a moment.

        • GreenKnight23@lemmy.world
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          5
          ·
          8 hours ago

          it’s just a word

          I don’t care

          you should think about using it in new repos

          so which is it?

          if it’s just a word then it shouldn’t matter if “master” is used.

          if you don’t care, then keeping “master” in use won’t bother you.

          why should I think about it? you said it doesn’t matter and you don’t care.

          regardless, I’ll keep using master because its a master record. not a trunk, not a main, and why would anyone call their branch a “release”? wouldn’t that get confusing when you do actual releases or tagging?

          • normalexit@lemmy.world
            link
            fedilink
            English
            arrow-up
            10
            arrow-down
            2
            ·
            7 hours ago

            You seem like a delightful person to work with. I’m just saying be pragmatic and maybe try not to be a dick about it?

            • GreenKnight23@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              5 hours ago

              I am a horrible person to work with because I demand from others what I demand of myself.

              if it takes me an average of 60 minutes to update each of my 73 repos, rules, and pipelines, and accounting for 25% more time in post pipeline issues; a “simple branch rename change” would cost me an estimated 92 hours of effort. just over 11 days of work.

              is it worth the efforts? I think not. would my boss allow me to do it? not only would they not let me do it, they would laugh me out of the building and take my key card.

              should I change how things are done from this day forward? let’s ask a different way.

              what harm could be done by segmenting standard pipeline configurations? new documentation would be needed, then maintained.

              then the question becomes what’s the best way to maintain two branching strategies? when new devs start, will they understand the nuances between strategy A vs B? what happens when they open PRs for main on a master repo?

              so now…a simple name change becomes far FAR more complex when you look past the initial change request.

              Also, I’m not a dick. I’m just pragmatic.

            • prettybunnys@sh.itjust.works
              link
              fedilink
              English
              arrow-up
              4
              arrow-down
              2
              ·
              edit-2
              5 hours ago

              It’s always eye raising when someone takes umbrage with using main over master.

              Like … awfully weird hill to die on, you’re kind telling on yourself some.

      • astrsk@fedia.io
        link
        fedilink
        arrow-up
        15
        arrow-down
        25
        ·
        20 hours ago

        The only statement in your ridiculous rant that has any validity is that of your legacy pipeline configurations. But pipelines need to be updated and validated semi-regularly and should be generalized to begin with, so it’s not really any good point that your legacy pipelines cannot handle a default branch name change like modern pipelines should.

        Swap main and master in your comment and it reads the exact same with all the same shallow justifications.

        • GreenKnight23@lemmy.world
          link
          fedilink
          English
          arrow-up
          15
          arrow-down
          5
          ·
          18 hours ago

          The only statement in your ridiculous rant that has any validity

          Thanks! It sure makes me want to have a civil discussion with someone who belittles my opinion and reduces it by calling it a “rant”.

          I’ll extend you the same courtesy as you have me.

          But pipelines need to be updated and validated semi-regularly…

          Not if you’re doing it right. sad shitty devs hack together pipelines that require constant maintenance. I’ve got pipelines that have worked flawlessly for over 7 years yet other projects I don’t own are constantly running into problems deploying because their pipelines were “configured for last release”.

          …and should be generalized to begin with,…

          Wrong again. Pipelines do the thing they are supposed to do and do it extremely well. are you sure you know what you’re talking about?

          …so it’s not really any good point that your legacy pipelines cannot handle a default branch name change like modern pipelines should.

          yeah fuck me for creating a pipeline for each of my environments that have dedicated branches. fuck me for setting a standard and adhering to that standard.

          if you need to switch your branch on your pipeline regularly you’re not following proper branching strategies.

          Swap main and master in your comment and it reads the exact same with all the same shallow justifications.

          you may be right, but the same could be said for literally any comparative opinion.

          • astrsk@fedia.io
            link
            fedilink
            arrow-up
            5
            arrow-down
            12
            ·
            17 hours ago

            lmao nothing you’ve said has anything to do with “Main is more concise and less problematic”. Just because you created more work for yourself by having 70+ pipelines that need to be rewritten for a branch name change doesn’t mean it’s less concise or more problematic. It means you messed up by not having a pipeline capable of such a basic feature – generalized targets with a separation of concerns. Standards change, requirements change, so do build pipelines. Being stubborn is not a reason against changing colloquial terms out of respect and growth in understanding.

            • GreenKnight23@lemmy.world
              link
              fedilink
              English
              arrow-up
              5
              arrow-down
              1
              ·
              15 hours ago

              colloquial terms? these are terms that describe technical standards that have likely been around longer than you’ve been alive.

              Imagine if your doctor one day said you have rectumbabados instead of colorectal cancer because the word “cancer” is too triggering.

              that’s the problem with young inexperienced devs these days. they just don’t get it. standards aren’t meant to change. standards are meant to adapt and evolve. forcing a frivolous name change on a branching strategy all for corporate to check their “social responsibility” checkbox is not evolving. it’s not adapting. it’s corporate grandstanding and literally is meaningless. like Target saying they support LGBTQ+ and then yanking all DEI support.

              I maintain enterprise solutions. I hold myself to a higher standard than you might and have proven my worth through consistent delivery. my builds take minutes. my deployments take minutes. my counterparts take an hour or more to build and deploy. if I were to do whatever the fuck you’re doing I would be out of a job.

              get some real experience before you go hotdogging with that tiny wiener you call expertise.

              • astrsk@fedia.io
                link
                fedilink
                arrow-up
                2
                arrow-down
                1
                ·
                7 hours ago

                Again, you’re conflating your own stubbornness with correctness and that just ain’t how it goes. Branch names are frivolous. So much so that changing the strategy or retargeting a branch one time shouldn’t be such a nightmare for your pipelines that you have to pretend like you’re the big dick on campus spouting accomplishments when someone mildly suggests there’s a mistake in your thinking. Look inward if you’re so upset by this that you have to make up irrelevant insults in a vague attempt to protect your own ego, then go fix your pipelines to make it easier to do for the next person after you’re gone.

                • GreenKnight23@lemmy.world
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  4 hours ago

                  I’m not confused but you seem to be. you were the one coming out swinging.

                  The only statement in your ridiculous rant that has any validity is that of your legacy pipeline configurations.

                  that was you, yes? you seemed mad. some advice, don’t go pissing on people if you don’t want to get pissed on.

                  if branch names are frivolous then why change them at all? why not keep it as master if it doesn’t matter? you seem to be conflating two conflicting streams of thought, are you ok?

                  I’ll show the math from another comment I posted just to show the true cost of a “simple change”.

                  if it takes me an average of 60 minutes to update each of my 73 repos, rules, and pipelines, and accounting for 25% more time in post pipeline issues; a “simple branch rename change” would cost me an estimated 92 hours of effort. just over 11 days of work.

                  btw, that’s dedicated work. no other projects get done in those hours.

                  then we have blowback. things like, updating documentation, training the rest of the team on using main over master, correctly attributing PRs to main over master, updating local scripts that may be referencing master, updating local repos that have master set as origin, etc…

                  how many hours will a company allot for tech debt? in theory, 10% of the sprint. in practice, 1%.

                  so now because of a “simple branch rename” we’ve reduced output, delayed delivery, increased error rates, increased confusion, increased stress. all for what?

                  a frivolous name of a branch, was it?

                  I think I’ll keep master around. you want to lose your job because you want to waste your time, go for it!