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

Technology

61774 readers
6632 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 content.
  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, to ask if your bot can be added please contact us.
  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 [email protected] !

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 43 points 1 week ago (6 children)

God I wish. The change to "main" was pointless and unnecessary. It's almost like people want to find problems when there aren't any.

[–] [email protected] 22 points 6 days ago (5 children)

I prefer main simply because it faster to type. I propose main branches be renamed to "m"

[–] [email protected] 9 points 6 days ago (1 children)

My main branch is called HEAD.

[–] [email protected] 9 points 5 days ago
[–] [email protected] 9 points 6 days ago

I demand trunk because https://trunkbaseddevelopment.com/ is a great branching strategy guide that anyone should read. It also explains how to release code or fix it in a good way.

[–] [email protected] 3 points 5 days ago

I like develop. Sounds nice and indicates things may be unstable.

[–] [email protected] 3 points 6 days ago

I don't think that's a good idea it's not descriptive enough in my opinion.

[–] [email protected] 1 points 5 days ago

How about trunk to imply how to use it

[–] [email protected] 13 points 5 days ago

Honestly I feel like people who had an issue with this were just as much making an issue out of nothing. I personally also think that "master" is just as much a normal and valid name as "main", and to me the rename kinda felt like performative bullshit. But at the same time it's just a name, if it makes people happy I don't really care either. Nowadays I tend to use main, but it's not something I really pay attention to.

[–] [email protected] 47 points 1 week ago (1 children)

Americans and their silly performative outrage

[–] [email protected] 24 points 1 week ago

A form of art they have main-ered.

[–] [email protected] 29 points 1 week ago

I guess masterpieces are now mainpieces

[–] [email protected] 23 points 1 week ago* (last edited 1 week ago) (1 children)

I like it, because it forced people not to assume master is the main branch. If something is common enough to almost be a standard, but it's not actually a standard, it's just waiting for disaster.

These assumptions cause unnecessary breakage, but people will make them unless forced not to.

[–] [email protected] 12 points 1 week ago (1 children)

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

[–] [email protected] 3 points 6 days 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.

[–] [email protected] 6 points 6 days ago (1 children)

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

[–] [email protected] 0 points 6 days 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.

[–] [email protected] 2 points 6 days ago

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