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 !

  • kreynen
    link
    fedilink
    22 months ago

    @astrsk@fedia.io

    @HK65@sopuli.xyz @normalexit@lemmy.world @GreenKnight23@lemmy.world

    The posts you are replying to ha e been deleted. I’m really currious what they said because we have one vendor who claims to be/is locked into usung “master”. This either requires us to write CI that merges main -> master and mirrors master back to main or use master. This can confuse junior devs once or twice, but it is really not an issue. The ONLY time I felt compelled to use master because of this vendor was when working with a group using GitLab. GitLab has a feature called Pull Mirroring that is MUCH more reliable than a pull/mirror action in GitHub that does the same thing, but to use that the branch names had to be the same.

    I see both sides of this argument. The master/slave relationship in tech is NOT like masterworks or mastering a craft. It is based on one “owning” the other, but I don’t think that allowing technology to work that way is violating its rights. Obviously changing the name doesn’t change the behavior and isn’t it really only when that behavior is applied to people that we have a problem with it?

    I never fully supported the effort required to change, but I’ve also never written anything in a way it would be difficult to change. I recognize that it could be considered a micro aggression, but it’s not like we are going to stop ants or bees from treating other classes as forced labor. Slavery exists. It is bad when applied to people. It accurately describes tech. Changing the name of the master db or branch did NOT free the slaves.

    • ℍ𝕂-𝟞𝟝OP
      link
      fedilink
      English
      1
      edit-2
      2 months ago

      The stupidest problem I’ve seen arising from this debate was that with one employer they had a legally required retention policy, and instead of implementing it in their GitLab server software, they did it directly by coming in between GitLab and git. The result was that they had no idea which to use, so they protected both.

      On one repo, we mistakenly made both branches, and there was no way to get rid of either, so it kinda just stayed there. It confused the hell out of new people.

      I use master for my own stuff because of muscle memory, on the job IDC I use whatever, usually main these years.

    • @elephantium@lemmy.world
      link
      fedilink
      English
      12 months ago

      master/slave relationship in tech

      Wait, this is a thread about branch names in git. The “master” in question would be more akin to a “master recording” from music, not master/slave software or system architecture.

      • astrsk
        link
        fedilink
        02 months ago

        While it may be true that the master branch is more akin to a master record, not everyone knows the nuance and quite frankly it doesn’t matter, if it makes people uncomfortable then it shouldn’t be a problem to accommodate a simple change, most of the tech world has already done so. Computers used to have a literal slave/master relationship with hardware components and control systems and we moved past that just fine despite still having controllers and actors everywhere.