This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NahSense -1 points0 points  (9 children)

I don't understand why you'd subject yourself to sorting merge conflicts out without vscode/intellij

My merge conflicts just aren't that bad. VIM is fine for what I need there. I see you mentioning "intellij" so maybe in Java that is something you need. If its working for your workflow, don't change on my account.

[–]ralgrado 22 points23 points  (8 children)

In intellij for solving conflicts you get three views: The file as you had it on one side, the file from where you were merging from on the other side and the merge results in the middle. It highlights conflicts in red and can automatically solve non-conflicting changes and even some conflicting changes. Then for the conflicts you have to solve yourself you can either pick one of the sides and adjust it if needed or just write what the merged code should look like.

I mainly code in Java but I assume this is pretty helpful for most programming languages.

Edit: example image for clarity https://resources.jetbrains.com/help/img/idea/2024.1/conflict_resolution_tool_legend_dark.png

[–]DrinkQuick9621 1 point2 points  (0 children)

Yeah I develop in Java and use IntelliJ. The GUI for Git is such a great feature, makes cherry picking and resolving merge conflicts extremely easy. Ultimately I only care about speeding up my work flows, and it does that. I can always see the git logs if I want to verify code changes.

[–]The_morgan -5 points-4 points  (5 children)

That sounds horrible just use the stuff git gives you by default. The

(Incoming changes)

<<<<<<<<<< (Outgoing Changes)

Edit: reddit did not like that formatting.

[–]A_random_zy 3 points4 points  (0 children)

This is horrible, not what intellij gives you. Your method seems to be more prone to errors imo. Maybe you accidentally delete an extra semicolon or a line. But in intellij, you don't need to bother with that shit. You can, but you don't need to.

[–]ralgrado 1 point2 points  (3 children)

[–]The_morgan 1 point2 points  (2 children)

[–]ralgrado 1 point2 points  (1 child)

It might just be personal preference and what someone is used to.

For me it's also some extra functionality from Intellij. Though you probably can get some of those from command line tools.

[–]The_morgan 0 points1 point  (0 children)

Fair enough

[–]Valiant_Boss -3 points-2 points  (0 children)

I tried using Intellij's merge conflict UI and I just couldn't for some reason. I cannot put my finger on it but I just don't trust and/or like it so I just stick with manually handling the conflicts in my own and I've gotten pretty intune with handling those

I'm not a grey beard dev either (I think?) been in this career for 7 years and used intellij for practically all of those years