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

Technology

63082 readers
3585 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 bamboo@lemmy.blahaj.zone !

top 50 comments
sorted by: hot top controversial new old
[–] phcorcoran@lemmy.world 102 points 3 weeks ago* (last edited 3 weeks ago)

(FYI I didn't make this and I believe it's fake but honestly it's hard to tell)

[–] bamboo@lemmy.blahaj.zone 53 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

What's your default branch name for the user you're logged in as: https://github.com/settings/repositories

For me this setting is main and I created a new repo, and the steps all include the main branch and not master.

[–] HK65@sopuli.xyz 36 points 3 weeks ago (2 children)

Well, that is embarassing. It's master.

I don't remember setting this, but then again, I don't remember a lot of things. Thanks!

[–] Kaboom@reddthat.com 15 points 3 weeks ago (1 children)

Is it an old setup? Git won't change existing configs.

[–] HK65@sopuli.xyz 1 points 3 weeks ago

You mean the GitHub account? It's my personal one, 9-10 years old I think.

[–] wholookshere@lemmy.blahaj.zone 7 points 3 weeks ago (1 children)

It defaults to master if your account existed before the change I believe.

At least I had to manually change it.

[–] HK65@sopuli.xyz 1 points 3 weeks ago

That might be it then. I never really read the getting started guide.

[–] InstallGentoo@lemmy.zip 43 points 3 weeks 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.

[–] count_dongulus@lemmy.world 47 points 3 weeks ago (1 children)

Americans and their silly performative outrage

[–] jaemo@sh.itjust.works 24 points 3 weeks ago

A form of art they have main-ered.

[–] TeamAssimilation@infosec.pub 29 points 3 weeks ago

I guess masterpieces are now mainpieces

[–] FooBarrington@lemmy.world 23 points 3 weeks ago* (last edited 3 weeks 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.

[–] ryathal@sh.itjust.works 12 points 3 weeks ago (1 children)

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

[–] FooBarrington@lemmy.world 3 points 3 weeks 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 3 weeks ago (2 children)

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

load more comments (2 replies)
[–] beeb@lemm.ee 22 points 3 weeks ago (5 children)

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

[–] heavydust@sh.itjust.works 9 points 3 weeks 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.

[–] PoolloverNathan@programming.dev 9 points 3 weeks ago (1 children)

My main branch is called HEAD.

You monster.

[–] raldone01@lemmy.world 3 points 3 weeks ago

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

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

[–] Kaboom@reddthat.com 1 points 3 weeks ago

How about trunk to imply how to use it

[–] gerryflap@feddit.nl 13 points 3 weeks 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.

[–] vinyl@lemmy.world 1 points 3 weeks ago
[–] normalexit@lemmy.world 30 points 3 weeks ago (1 children)

Main is more concise and less problematic. A win all around.

[–] Semi_Hemi_Demigod@lemmy.world 8 points 3 weeks ago

As another data point I just set one up yesterday and it gave me a main branch, not master.

[–] phoenixz@lemmy.ca 6 points 3 weeks ago (5 children)

I honestly never saw a problem with master / slave, nor with whitelist / blacklist. It's the same as killing children, forking children, etc, it's computer terminology and not everything means that bad thing that you personally want it to mean.

I'm not politically correct, I live in a real world. Calling a git repository different really isn't doing shit against slavery and it pisses me off that people are going to down vote me on their slavery built iPhone because apparently I like naughty words and you apparently like slavery.

You want to stop racism? Then stop meddling with computer terminology and go out there and actually do something real.

[–] Mubelotix@jlai.lu 6 points 3 weeks ago* (last edited 3 weeks ago) (2 children)

Do you speak french too? I'm french myself and we use master for so many normal things. Americans don't get that word right because their langage lost many of its meanings. It's funny to see people get offended just because they misunderstand the etymology of a word

[–] phoenixz@lemmy.ca 2 points 2 weeks ago

I lived in Mexico for a long time and the amount of bullshit I've had for using the word "negro" is just astonishing and insane. Can't point out the color of the night sky in mexict, that's racism, somehow.

To clarify, as far as I know it's only people from the US that freak about this, other countries don't really seem to have this problem.

[–] HK65@sopuli.xyz 2 points 3 weeks ago

It’s funny to see people get offended just because they misunderstand the etymology of a word

I've got a story for you then:

load more comments (3 replies)
load more comments
view more: next ›