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

Programmer Humor

26817 readers
3453 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
[–] mr_satan@lemmy.zip 4 points 3 days ago (1 children)

Same… My usual strategy: rebase, if conflict abort and merge, if no conflict continue; merge always with explicit commits to master / main (no fucking squashing); keep task references in branch names and commit messages.

[–] balsoft@lemmy.ml 1 points 3 days ago (1 children)

Same, but typically I will just resolve the conflicts during the rebase. Makes for cleaner commit history. Merge commits are for combining multiple big unrelated pieces of work together, where rebasing would be too annoying (let's say 100s of commits each).

[–] mr_satan@lemmy.zip 1 points 3 days ago* (last edited 3 days ago) (1 children)

In my cases I has to solve same code conflicts multiple times during a rebase, so I just don't try them when hit with conflicts.

I fail to see the benefits of "clean" git history

[–] balsoft@lemmy.ml 1 points 3 days ago (1 children)

In my cases I has to solve same code conflicts multiple times during a rebase, so I just don’t try them when hit with conflicts.

Yeah if you have two branches, both with a bunch of commits which all modify the same areas of code, and reordering the commits doesn't help, I can see how it is easier to merge.

I fail to see the benefits of “clean” git history

Well, if the commit history is clean and mostly linear, it's much easier to read, understand and review. git blame will also be much nicer which is really important for debugging big codebases. Of course it's a tradeoff, as usual.

[–] mr_satan@lemmy.zip 1 points 3 days ago

Maybe I just haven't been exposed to bad examples. Never had any issues with blame and merge commits.