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
    66
    arrow-down
    26
    ·
    2 days 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.

    • gerryflap@feddit.nl
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 hours ago

      Honestly I feel like people who had an issue with this were just as much making an issue out of nothing. I personally also think that “master” is just as much a normal and valid name as “main”, and to me the rename kinda felt like performative bullshit. But at the same time it’s just a name, if it makes people happy I don’t really care either. Nowadays I tend to use main, but it’s not something I really pay attention to.

    • beeb@lemm.ee
      link
      fedilink
      English
      arrow-up
      12
      ·
      12 hours ago

      I prefer main simply because it faster to type. I propose main branches be renamed to “m”

    • FooBarrington@lemmy.world
      link
      fedilink
      English
      arrow-up
      27
      arrow-down
      5
      ·
      edit-2
      2 days 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
          5
          arrow-down
          2
          ·
          1 day 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
            6
            arrow-down
            1
            ·
            1 day 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
              arrow-down
              1
              ·
              1 day 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.

              • clif@lemmy.world
                link
                fedilink
                English
                arrow-up
                1
                ·
                10 hours ago

                I’ll find something else to screw up and cause it to break, don’t worry.