this post was submitted on 30 Jan 2025
58 points (84.5% liked)

Technology

68305 readers
4324 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related news or articles.
  3. Be excellent to each other!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, this includes using AI responses and summaries. To ask if your bot can be added please contact a mod.
  9. Check for duplicates before posting, duplicates may be removed
  10. Accounts 7 days and younger will have their posts automatically removed.

Approved Bots


founded 2 years ago
MODERATORS
 

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 !

you are viewing a single comment's thread
view the rest of the comments
[–] ryathal@sh.itjust.works 12 points 2 months ago (1 children)

If something is common enough to be a standard it's a standard.

[–] FooBarrington@lemmy.world 3 points 2 months ago (1 children)

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 6 points 2 months ago (1 children)

Having a magical standard fairy waive a wand isn't going to fix scripts, or stop them from breaking.

[–] FooBarrington@lemmy.world 0 points 2 months ago (1 children)

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 2 points 2 months ago

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