this post was submitted on 11 Oct 2025
557 points (99.1% liked)

Programmer Humor

26827 readers
2369 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
you are viewing a single comment's thread
view the rest of the comments
[–] cupcakezealot@piefed.blahaj.zone 22 points 9 hours ago (1 children)
git reset --hard <commit-hash>  
git push -f origin main  

i didn't see anything, officer

[–] martinb@lemmy.sdf.org 14 points 9 hours ago (2 children)

You should be forcibly kept away from production systems...

[–] joyjoy@lemmy.zip 2 points 5 hours ago (1 children)

Never use --force. Always use --force-with-lease.

[–] enbiousenvy@lemmy.blahaj.zone 2 points 3 hours ago (2 children)

I've mistyped that a couple of times to be --force-with-leash

[–] joyjoy@lemmy.zip 3 points 1 hour ago

git push origin master --force-with-leash

Don't do that to your master.

[–] cupcakezealot@piefed.blahaj.zone 1 points 1 hour ago* (last edited 1 hour ago)

only do that in puppygit (with consent)

[–] henfredemars 9 points 8 hours ago (1 children)

We had an intern do this once. We changed our server config to make sure it wouldn’t accept such operations.

[–] gravitas_deficiency@sh.itjust.works -2 points 6 hours ago* (last edited 6 hours ago) (1 children)

It’s just a branch guard + properly implementing git user and team permission structures - you’re not “configuring a server”

[–] marcos@lemmy.world 1 points 2 hours ago

I wonder what you think "configuring" means.