this post was submitted on 07 Feb 2025
734 points (99.1% liked)

Programmer Humor

33322 readers
597 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 83 points 5 days ago (9 children)

If you've ever royally fucked something up in git, that hotline is necessary

[–] [email protected] 20 points 5 days ago (2 children)

Never understood why this is such a trope. There's very little you can't recover in git (basically, only changes you never committed in the first place).

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

Have you ever tried a rebase?

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

Not sure if serious or not, but yeah I use interactive rebases every day, many times a day (it's nice for keeping a clean, logical history of atomic changes).

It's very simple to recover if you accidentally do something you don't intend (git rebase --abort if the rebase is still active, git reflog to find the commit before the rebase if it's finished).

load more comments (6 replies)