this post was submitted on 26 Aug 2023
1208 points (98.4% liked)

Programmer Humor

31329 readers
20 users here now

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

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] divineslayer@lemmy.world 109 points 10 months ago (5 children)

I feel like I often would prefer to get the merge conflict. So many times my coworkers will somehow mess up the code I committed when resolving the conflict.

[–] charliespider@lemmy.world 33 points 10 months ago (1 children)

Rebase all of your work branches onto HEAD so that conflicts require refactoring the first commit where things don't match up. This can make conflicts easier to deal with (in my humble opinion) since you deal with conflicts earlier in your commit history as opposed to at the end after ALL of your changes are made.

Plus a linear history is super nice to work with later on.

[–] dandroid@dandroid.app 7 points 10 months ago (1 children)

I always squash my commits before rebasing. Is your way easier? I never really seem to have a problem with merge conflicts.

[–] charliespider@lemmy.world 4 points 10 months ago

We squash when merging. Final git history is super clean and linear.

[–] reverendsteveii@lemm.ee 18 points 10 months ago

This way I can wreck their shit instead! Enjoy debugging this one Tim, you obtuse bastard!

[–] UndefinedIsNotAFunction@programming.dev 10 points 10 months ago (1 children)

Dear god yes. Please just let me deal with the conflict before the kids make it worse.

[–] fer0n@lemm.ee 3 points 10 months ago

!usernamechecksout@lemmy.zip

[–] dis_honestfamiliar@lemmy.world 3 points 10 months ago

Inschools project, I once used the flag ours.

[–] joyjoy@lemm.ee 2 points 10 months ago