268
top 21 comments
sorted by: hot top controversial new old
[-] ripcord@lemmy.world 2 points 3 hours ago

No latest branch

[-] eager_eagle@lemmy.world 23 points 9 hours ago

it has always bothered me that checkout is overloaded: it can switch branches or discard pending changes in an unrecoverable way.

so, PSA, you can replicate the safe part of checkout with git switch and the unsafe with git restore.

[-] tux0r@feddit.org 7 points 8 hours ago

Ah, I love coherent software.

[-] sik0fewl@lemmy.ca 2 points 3 hours ago

Switch and restore came later because checkout was problematic.

Just alias stuff like that, make it coherent.

[-] tux0r@feddit.org 15 points 9 hours ago

I renamed my master branch slaveowner. To make it more clear.

It is software, my friends. It’s not a tribe of people.

[-] chuckleslord@lemmy.world 1 points 4 hours ago* (last edited 19 minutes ago)

Not gonna lie, the master branch thing has been perceived as problematic but I don't typically see an issue with it. It's similar to master bedroom or bath. ~~Kind of fucked up name origin, but~~ I don't think anyone's really making a fuss about it.

Whatever the fuck you're doing though feels like some gross, racist fantasy. It's really weird, dude. If you think that's funny you might need to go talk to some real people or touch grass.

[-] expr@programming.dev 5 points 1 hour ago

Wtf are you talking about? It doesn't have a fucked up name origin at all. It was named "master" as in "master recording", like in music production. Proof: https://x.com/xpasky/status/1271477451756056577.

Master/slave concepts were never a thing in git. The whole renaming thing was really fucking stupid. Caused plenty of breakage of scripts and tools for absolutely no good reason whatsoever.

[-] chuckleslord@lemmy.world 1 points 22 minutes ago

Alright. Doesn't change my main point. Which is the person's name for the master branch is fucking weird.

[-] sik0fewl@lemmy.ca 5 points 3 hours ago

Master bedroom and master bath also have nothing to do with slavery.

[-] tux0r@feddit.org -3 points 3 hours ago

Please grow up.

[-] cenzorrll@piefed.ca 6 points 7 hours ago

You could do that, but I could argue that master/slave nomenclature isnt a good scheme for this anyway, since it doesn't control any other branches. Unlike master and slave drives from the olden days.

By all means go ahead and keep your naming schemes. It's your own stuff that after all, that for some reason you felt the need to tell everyone about. However, I might recommend trying to move past it seeing as language has an impact on how people think, and being edgy doesn't exactly have a good track record of producing the best people.

[-] psycotica0@lemmy.ca 11 points 4 hours ago

I always assumed the name was more of a reference to audio Master Recordings.

It's the original tapes or whatever that all copies are derived from. It's also where the term "remastering" comes from, as in "we went in and rebuilt a new master from the individual tracks, and this is the new master now", versus just making another copy of the master for a re-release.

[-] sik0fewl@lemmy.ca 1 points 3 hours ago

There are no slave branches like there are no slave recordings.

[-] tux0r@feddit.org 0 points 7 hours ago

My “master” branch actually does control other branches, as releases are usually made from it, so they all depend on it.

[-] boredsquirrel@slrpnk.net 23 points 10 hours ago* (last edited 10 hours ago)

git push master --force

[-] Zagorath@aussie.zone 7 points 10 hours ago

TranscriptionThe "It's an Older Meme, But It Checks Out" meme, featuring an image of an Imperial officer from Star Wars, with the caption:

It's an older branch, sir

But it checks out

[-] Zagorath@aussie.zone 6 points 10 hours ago

I usually create new repos through GitHub or another central repo's system, where it defaults to calling the main branch main. But I did recently create a new repo with my local Git's git init, and had to deal with a master branch on a completely new repo for the first time in a while. It was actually kinda a weird experience.

[-] pageflight@lemmy.world 1 points 35 minutes ago

Yeah, current company has their internal git server default to master and it was a little odd first time I created a new repo. Luckily all the CI templates can recognize either name so I just switched it.

[-] NuXCOM_90Percent@lemmy.zip 19 points 10 hours ago* (last edited 10 hours ago)
git checkout -b main
git branch -D master
git config --global init.defaultBranch main

You don't have to deal with shit if you don't want to.

[-] dohpaz42@lemmy.world 5 points 10 hours ago

If you haven’t already found it, you need to change your global git config (~/.gitconfig):

git config --global init.defaultBranch main

(or whatever you want to call it; e.g. daddy would work too)

For any existing repositories you want to run the following command in the existing repository root (./.git/config):

git config set init.defaultBranch main

this post was submitted on 09 Dec 2025
268 points (98.2% liked)

Programmer Humor

27778 readers
1521 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS