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 !

  • ℍ𝕂-𝟞𝟝@sopuli.xyzOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    9 hours 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.