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 !

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