somehow my vscode changed, when i want to resolve merge conflict,there is something like <<<<HEAD , but now it's like a yellow square on picture, why is that? can anyone tell me why?
Asked
Active
Viewed 9,216 times
51
-
12Thanks for your question, it helped me to solve the problem. The new interface is hard to use. – tranthaihoang Aug 10 '22 at 07:11
-
Does anyone know how to accept a current or incoming change in this new view? – martinedwards Aug 22 '22 at 18:36
-
Why are there suddenly so many choices, so many decisions to be made and so many buttons to press? I just want to accept incoming changes and get on with my life. – Graham Hesketh Nov 15 '22 at 17:59
-
@GrahamHesketh if you perform a pull and git can't solve the conflict automatic you get a merge conflict, YOU have to solve the conflict – rioV8 Nov 15 '22 at 18:32
-
@rioV8 OK, so I choose whether to accept something or not why do I need to look at three things, why is this now a 3 body problem with buttons for changing things all over the place. It seemed simple before: I am here, this is coming in do you want to keep what you have or what they are sending. Doing this line block by block. I don't know where to begin with this new view and can't find docs. – Graham Hesketh Nov 15 '22 at 19:42
-
@GrahamHesketh they now have implemented a 3-way merge, they show the joined ancestor, you can choose the same blocks as the previous GUI but now they are not buttons above the block but in the gutter, you can add a doc issue for the section https://code.visualstudio.com/docs/sourcecontrol/overview#_merge-conflicts, it still is not updated for the new GUI and the setting to get the old GUI back – rioV8 Nov 15 '22 at 19:54
4 Answers
58
In the user settings, you can disable Git Merge Editor
:
VS Code Settings Screenshot

rioV8
- 24,506
- 3
- 32
- 49

user12784070
- 581
- 3
- 2
-
3You are a hero. I was going crazy trying to figure out what changed and that other view was so distracting. – Sam Howle Aug 19 '22 at 00:17
-
3Thank you! I don't know why they changed a feature that worked amazingly – Agustin Meriles Aug 24 '22 at 14:23
-
It seems that VSC decided to change the default behavior after one of the updates. I know that there are a lot of code changes comparison tools that works similarly but the previous one with current / incoming change was much easier to use for me – AdamKniec Sep 01 '22 at 14:33
-
Here's a whole discussion about toggling the git merge editor: https://github.com/microsoft/vscode/issues/156608 – zeusstl Sep 14 '22 at 20:00
-
31
I finally fix this by these configs
"diffEditor.codeLens": true,
"git.mergeEditor": false
-
1You're seriously going to switch back to the old UI?!? There's been folks like myself who have been waiting for this feature to come out for years now! Oh my days!! – Isaac Pak Aug 09 '22 at 01:26
-
6@IsaacPak Probably some people like the view of the git conflict markers, it matches the git book before merge editors where made – rioV8 Aug 09 '22 at 03:11
-
@rioV8 I guess. But to answer the OP's question of "can anyone tell me why?", this new feature gives you a line by line editing and results view. This is a great time-saver for large blocks of conflicts. Read this [issue](https://github.com/microsoft/vscode/issues/5770) for more details. – Isaac Pak Aug 09 '22 at 10:35
-
11@IsaacPak I've spent hours with the new merge editor, trying to give it an honest chance, but it's been a headache. There is too much manual copy and pasting with the mouse. The checkboxes offer no new value compared to the old UI. Sure they work fine for basic merges where you only need to select a side, but those were already easy. When you have *real* conflicts and not just git being confused, you need to combine lines from both changes. That process is now more complicated and manual. Frankly, they should just clone Intellij's merge tool. – Drew Nutter Aug 16 '22 at 18:41
-
1@DrewNutter With any 'real' merge conflict you HAVE to make changes manually. With any 'real' merge conflict you don't know what's changed with Inline diffing. I'm having no issues whatsoever. – Isaac Pak Aug 17 '22 at 02:29
-
@IsaacPak I just don't see an advantage to the new layout. But when you need to actually combine code from both changes, it's twice as many steps. – Drew Nutter Aug 17 '22 at 16:41
-
@DrewNutter dev of the new merge editor here. I would love to know more about your experience! Let's try to find out how the new merge editor could potentially be advantageous over the old experience even for your merge conflict. For that, it would be awesome if you could share your conflict (you can use the "Copy Merge Editor State As JSON" command for that)! – Henning Aug 17 '22 at 20:53
-
2The merge editor looks designed by someone averse to visual clarity, and designed for his enemies. Jokes aside, I'm sure they were doing their best and it will improve based on feedback, but the first impression impact was "ouch". – Mihai Popescu Aug 18 '22 at 07:22
-
The single biggest frustration with the new merge editor is in the inability to select individual lines from within a block to use for the merge. The checkboxes for each diff include way too much code to be useful, and 99% of the time are completely useless other than to serve as text fields to copy/paste from. I do not find myself using the UI elements within the diffs at all, and the colors all being yellow hurts my eyes. Would love a green = "theirs" - blue = "mine", yellow = "merged" strategy (yellow meaning take caution before committing it) – Jimmay Aug 31 '22 at 19:40
1
If you don't want to remove this feature, there should be a checkbox to the left of each yellow box which you can use to select the conflict(s) that you would like to persist (similar to how the old merge conflict control worked)

JP Connolly
- 11
- 1