this post was submitted on 06 Oct 2025
829 points (96.7% liked)

Programmer Humor

26799 readers
2661 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
 

Yeah learned this the hard way.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] balsoft@lemmy.ml 2 points 3 days ago* (last edited 3 days ago) (1 children)

Specifically screwing up rebase. It is recoverable, but very annoying.

WDYM? Typically git rebase --abort will "just work". If you have specifically done something really wrong, just look into git reflog and then git reset --hard to whatever commit you were before the rebase.

Pushing your commit without fetching

Git won't allow you to do that if you set up your server properly. It will force you to pull first. I have [pull] rebase = true in my settings so that it always rebases my commits instead of merging them, which makes for much cleaner history.

Continuing on a branch even after it was merged.

This generally shouldn't be a problem, you can just rebase the branch afterwards and it will be fine (the common commits will typically just be dropped).

The problem is not when I have to rebase. I know how to handle it. But with juniors they approach us only when things are in a really bad situation, where they cluelessly applied some commands they found on internet or from an LLM. Then it is very annoying to sit down and untangle the mess they created.

And regarding the pushing without fetching, it is usually a different branch. So they won't incorporate the new changes in the main branch into their working branch, but just push their work into a branch. Again not a big deal. Just annoying.