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
    15
    arrow-down
    3
    ·
    edit-2
    2 days 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.

      • normalexit@lemmy.world
        link
        fedilink
        English
        arrow-up
        12
        arrow-down
        3
        ·
        2 days 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?

        • prettybunnys@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          6
          arrow-down
          3
          ·
          edit-2
          2 days 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.

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

                what’s hilarious to me is none of you realizes that I might not be white. you’ve judged the color of my skin entirely based on an opinion that conflicts with your perception of what a person of color would have. last time I checked that’s racial profiling, which is racist. so…who’s trying to impose power over whom here?

                regardless, I vehemently deny that I want to use “master” to force my will onto others (outside of maintaining a standard branching strat). as I have stated previously, the hourly cost to convert master to main is far too high to consume and too frivolous of a change to piecemeal out over the next three years.

                until HR is ready to explain to the executives why I can’t deliver the features they want this quarter, it’ll stay as “master”.

            • boatswain@infosec.pub
              link
              fedilink
              English
              arrow-up
              3
              ·
              13 hours ago

              That you’d be a bad teammate: the kind of person who puts personal preference above what the group has decided and causes problems for no good reason; the kind of person who would insist on indenting with spaces when the whole team has decided to use tabs.

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

                my editor converts tabs to spaces and back again. so that’s a non-issue.

                I do put personal preference ahead of what the group wants if the group wants something that has been called “frivolous” and “not that big of a deal”.

                I don’t understand how I’m the asshole if I’m the one made responsible for setting the standards for the team.