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 !

  • InstallGentoo@lemmy.zip
    link
    fedilink
    English
    arrow-up
    44
    arrow-down
    17
    ·
    1 day 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
      18
      arrow-down
      4
      ·
      edit-2
      21 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
          2
          arrow-down
          1
          ·
          12 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
            ·
            12 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
              ·
              11 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
      28
      ·
      1 day 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!

      • normalexit@lemmy.world
        link
        fedilink
        English
        arrow-up
        13
        arrow-down
        2
        ·
        edit-2
        15 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.

      • astrsk@fedia.io
        link
        fedilink
        arrow-up
        15
        arrow-down
        25
        ·
        1 day 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.

          • astrsk@fedia.io
            link
            fedilink
            arrow-up
            5
            arrow-down
            12
            ·
            24 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.

              • astrsk@fedia.io
                link
                fedilink
                arrow-up
                2
                arrow-down
                1
                ·
                14 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.