Closed asydneylover closed 2 years ago
This will be a super cool feature, I use VSCode
for my day job but often resort to WebStorm
when I need to resolve a merge conflict due to its interactivity and ease to use.
Any news on this? this feature would be amazing. On one hand, there is a diff tool (i.e. comparing two files) in VS code, but you cannot edit / chose what to keep; on the other hand, there is a merge conflict tool that allows to chose what to keep (current change / their change). Now, the best would be to have both tools into one tool, such as the tool suggested by @uyhung.
I also wanted to add, for any contributor who comes by: VS Code is an amazing piece of software, keep it up :) !
That will be an amazing feature... any news on it? does anyone recommend some extension that does something similar?
I'm using that on PyCharm. Such amazing feature, it helps a lot with avoiding bugs on bigger merges. All linters are available during process, so errors/style violations/unused variables are easy to spot.
Please hurry up with this feature if you're planning to implement it :)
Thumb up đź‘Ť for this one. That's the only thing holding my back to totally switch to VSCode. Would be super helpful and handy.
The day you implement this feature I will stop using webstorm.
Not only to resolve conflicts, this design should be available to see the history file too.
git config merge.conflictStyle diff3
and you have this today but with VSCode's in-editor layout - which is vastly better than popping up a dialogue and a new window to view the file you already had open IMO!
Any news? Is it scheduled maybe, or planned to be scheduled?
Yes really needed
this is much needed feature, im using inteliij idea just to resolve conflicts.
+1, this would be awesome!
+1 here! Trying to make the switch, but IMO this is one of the major features missing to switch from WebStorm to VSCode
Can we please stop with the +1 comments? It brings nothing to the conversation. Just watch this thread and wait...
@Zielak +1 let's stop adding more comments
Anyone know if there is any plugin that can make this possible ?
@rajjejosefsson As I said above, you can set: (git config merge.conflictStyle diff3
)
[merge]
conflictStyle = diff3
to see them/common/us. It won't change the VSCode formatting/theme, but you will get those three parts to your diff instead of just them/us as is the (git) default.
Unless there's something else (other than opening multiple dialogues just to get back to view a diff in the file you already had open) that JetBrains IDEs offer that I'm missing here?
The newly released Sublime Merge has a similar implementation.
This will be a super cool feature, I use
VSCode
for my day job but often resort toWebStorm
when I need to resolve a merge conflict due to its interactivity and ease to use.
You can add these configuration in your .gitconfig file and type "git mergetool" on your terminal whenever conflict appears. It'll only open your merge gui interface from webstorm for each file.
[mergetool "webstorm"]
cmd = webstorm merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED")
trustExitCode = true
[merge]
tool = webstorm
+1 here, is now the only reason I use webstorm!
+1
+1
True, VS Code is amazing except for the lack of this UI tool.
+1, This is exactly what I expect the merge tool to look like. And #5770 should be implemented like this.
+1 it's the only feature that I'm really missing while using VSC in comparison to WebStorm.
I would very much like this implemented as well, the only big whole I see in VS code as a full IDE
Ok, since Webstorm seems to be the only real solution, I'm going to go download that now.
Really looking forward to VSCode supporting this feature!!
Also, could someone downvote this post for me? Thanks :P
Is this feature even in the works?
+1, totally would use this if implemented
I added a new setting and command to improve the merge conflict resolution a bit, here is what the experience will be after https://github.com/microsoft/vscode/pull/74231 is merged
Firstly a new setting merge-conflict.diffViewContext
was added to show the context around the conflict
Before: there is no context around the diff
After: with "merge-conflict.diffViewContext": 3
Secondly, a new command Compare All is introduced to display the full compare between current workspace and incoming changes, with which you can compare the old content, the incoming one, and the latest local content on disk
More work in the editor area needs to be done to support the JetBrains style, for example, opening a three column editor group from the conflict. But I still want to hear your feedback on the current solution mentioned above.
This is cool. Can you pick line by line what change you want to merged into the new file or is it just one file or the other? Line by line or All would be awesome!!!
If you can accept each change from either file block by block and merge into the third that would probably cover most use cases. So for example if one file had 3 changes and the other file had 4 I could chose whatever I wanted. Like accept 2 changes from one file and 2 changes from the other. Can it do this? If so...that rocks!
@rebornix The additional context is nice, and I like the compare all, but for me there still a few things missing:
# 2 can probably be done today with a custom file system provider (though that feel like a lot of overkill)
@eamodio
Comparing each "side" with the common base -- while a 3-way merge view is probably best, this could at least help in the interim (I've been toying with adding something for this in GitLens)
This one requires adding a new three way diff view (a three way diff algorithm and a three column editor) but it's doable. For # 2, I think a custom file system provider is the right way to go as the file content on disk contains merge conflicts (like >>>>>>, <<<<<<
), while picking content changes from the diff view, we don't want to mess up with the file on disk, so it' a virtual file system provider already.
Need this feature very much.
@rebornix I like the idea I think it can be even better than open a 3 column editor since the laptop screens are not soo big. I think can be easier to improve it a bit to look finally like the Gitkracken merge tool showing the context on the top editor and allowing editing the reluting file (that currently has >>>><<<< ...) on the bottom.
Yeah, often when there is merge conflict I switch to PHPStorm, even if the other work on the project I do in VSCode. It's weird that two years passed and there is still no appropriate merger.
@rebornix I like the idea I think it can be even better than open a 3 column editor since the laptop screens are not soo big. I think can be easier to improve it a bit to look finally like the Gitkracken merge tool showing the context on the top editor and allowing editing the reluting file (that currently has >>>><<<< ...) on the bottom.
I disagree, the three column layout is part of what makes the Webstorm one so great. It keeps a very neat overview
Same here, I always switch over to IntelliJ for merge conflict resolution. The „Resolve simple conflicts“ magic wand tool saves so much time too!
I change back to Visual Studio 2017 to resolve conflicts...
On Tue, Jun 25, 2019 at 8:35 AM fabb notifications@github.com wrote:
Same here, I always switch over to IntelliJ for merge conflict resolution. The „Resolve simple conflicts“ magic wand tool saves so much time too!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/37350?email_source=notifications&email_token=AAEN6O3LOPBVEY7PMABVNRDP4I3KZA5CNFSM4EBV5J4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQUWAQ#issuecomment-505498370, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEN6O4AO24V4GB24EWOJGDP4I3KZANCNFSM4EBV5J4A .
vscode must change git conflict tool, because while resolving conflicts vscode adds <<<
, ===
, which causes language syntax error
@SupinePandora43 That's not VSCode, that's how git handles conflicts, it adds <<<
, ===
to conflicting lines. WebStorm parses this blocks and creates great visual tool for merging.
@vedmant then... vscode needs some parser
See here. Is that what you mean? https://github.com/Microsoft/vscode-tips-and-tricks/blob/master/media/resolve_merge_conflicts.gif
@minkir014 Check attached image on original comment on top, this what everybody mean.
This is in vs code tips and tricks and that means it's built in vs code. So, why this issue is still opened?
@minkir014 I'll link the image from original comment here again, cause you clearly are thinking about something different: https://user-images.githubusercontent.com/1470309/32250860-c677e4ce-bec0-11e7-82b5-0196d981cc28.png
@minkir014 What's in VS code now is nothing near the feature IntelliJ has, just compare this: https://user-images.githubusercontent.com/1470309/32250860-c677e4ce-bec0-11e7-82b5-0196d981cc28.png and what you posted https://github.com/Microsoft/vscode-tips-and-tricks/blob/master/media/resolve_merge_conflicts.gif do you see much similarities?
@minkir014 because built in feature it's not the same as we are discussing in this thread.
IntelliJ, and all other IntelliJ-based IDE such as WebStorm, support a git merge's conflict resolution tool that it shows the conflict in three columns:
Please see my attached file.
I find that it's super easy for us to resolve conflict, because I can compare the Local Changes and the Server Changes on the same windows, and I can see the Resolution Result immediately.
Can we please support that?