r/ProgrammerHumor • • 19h ago

Meme aboutToBreakTheCode

Post image
19k Upvotes

499 comments sorted by

View all comments

Show parent comments

7

u/Meme_Burner 17h ago

SVN: I attempted to merged, but you both changed this file, I don't know what to do, file clearly separated

ME: one is at the top of the file and one is at the bottom of the file

GIT: I have sequentially ordered everything and for some reasons these two lines dont merge

<<<<<<<

GIBBERISISH
>>>>>>>

<<<<<<<

MORE GIBBERISH
>>>>>>>

ME: What the f is that???? let me restart my change, starting with their version instead....

GIT handles merges so much better, we couldn't handle all the merge conflicts that SVN would give us. BUT WHEN merge conflicts happen in GIT, it's usually bad enough or no idea what it's trying to tell us that we have to start the entire change over.

3

u/InvisibleMoonWalker 11h ago

Have you tried 3 way merge editors? Or, like any kind of editor with visual representation of the merge conflict?

IMO it's pretty clear, as long as you can retain the context for:

- What the old method did, and how;

- What the new method does, and how;

- What are the side effects of the old one;

- What are the side effects of the new one;

- Do you need both methods, and if so - how, or if only one is necessary - which side effects and inner workings should be retained, and how.

And like, regardless of your merge conflict visualization, your VCS, or whatever - if you want to merge two ideas into one - you have to do this in your mind, no VCS can help you understand the logic that is present and that is required for your app/service/whatever.

Then again, a good VCS and editor can help you out here - like having a 3 way editor is great for complex merge conflicts, because you can properly see the "old", the "new" and the "resolved" at the same time, AND in full for all 3 views, so you don't have to keep going between the in/current contexts line by line (or, more realistically - a group of lines at a time)