Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support 3 way merge for git conflicts #37350

Closed
asydneylover opened this issue Oct 31, 2017 · 158 comments
Closed

Support 3 way merge for git conflicts #37350

asydneylover opened this issue Oct 31, 2017 · 158 comments
Assignees
Labels
feature-request Request for new features or functionality merge-editor scm General SCM compound issues verified Verification succeeded
Milestone

Comments

@asydneylover
Copy link

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:

  • the first column for Local Changes
  • the third column for Changes from Server
  • the second column for Conflict Resolution Result

Please see my attached file.
merge-conflict-resolution

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?

@vscodebot vscodebot bot added the merge-conflict Merge conflict decorations and actions label Oct 31, 2017
@chrmarti chrmarti added the feature-request Request for new features or functionality label Oct 31, 2017
@chrmarti chrmarti removed their assignment Oct 31, 2017
@Auwalms
Copy link

Auwalms commented Jan 27, 2018

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.

@Nodragem
Copy link

Nodragem commented Feb 2, 2018

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 :) !

@uvaldez

This comment was marked as spam.

@krzysztofwolski

This comment was marked as spam.

@millanbrankovic

This comment was marked as spam.

@igocooper

This comment was marked as spam.

@VladimirTyalo

This comment was marked as spam.

@argordmel

This comment was marked as off-topic.

@OJFord
Copy link

OJFord commented May 22, 2018

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!

@VladislavAnkudinov

This comment was marked as spam.

@menvil

This comment was marked as spam.

@ltsharma

This comment was marked as spam.

@TimoWestland

This comment was marked as spam.

@yannickbuntsma

This comment was marked as spam.

@Zielak

This comment was marked as resolved.

@stephanmullerNL

This comment was marked as resolved.

@rajjejosefsson
Copy link

Anyone know if there is any plugin that can make this possible ?

@OJFord
Copy link

OJFord commented Aug 5, 2018

@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?

@smbkr
Copy link
Contributor

smbkr commented Sep 20, 2018

The newly released Sublime Merge has a similar implementation.

@tsachit
Copy link

tsachit commented Oct 12, 2018

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.

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

@giordanocardillo

This comment was marked as spam.

@krsiakdaniel

This comment was marked as spam.

1 similar comment
@rsimmonsjr

This comment was marked as spam.

@logusgraphics

This comment was marked as spam.

@tarekahf

This comment was marked as spam.

@tsachit

This comment was marked as spam.

@linqunhe

This comment was marked as spam.

@numandev1

This comment was marked as spam.

@g707175425

This comment was marked as off-topic.

@elazarcoh

This comment was marked as spam.

@soydivision

This comment was marked as spam.

@numandev1
Copy link

@daviddossett @isidorn what is the status of 3 way merge because, in the iteration plan, you are working 3-way merge.

@isidorn
Copy link
Contributor

isidorn commented Mar 25, 2022

We are working on 3-way merge - we are in the investigation phase. As soon as we have updates we will share here. We hope this is something that will happen this year.

@cloudhan

This comment was marked as off-topic.

@sb-baris

This comment was marked as off-topic.

@cloudhan

This comment was marked as off-topic.

@nemchik
Copy link

nemchik commented Mar 25, 2022

Hassling contributors for ETAs isn't going to get it released faster. Please be appreciative that someone has taken the time to put their efforts into making this happen for us all.

@machinecode
Copy link

Hi @isidorn, my guess is most of the people here expect a 3-way merge screen with a magic wand like Intellij had. Please consider having such that feature too.

@miguelsolorio miguelsolorio mentioned this issue Apr 5, 2022
52 tasks
@microsoft microsoft locked as spam and limited conversation to collaborators Apr 13, 2022
@jrieken jrieken added merge-editor and removed merge-conflict Merge conflict decorations and actions labels Apr 13, 2022
@jrieken
Copy link
Member

jrieken commented Apr 13, 2022

Just repeating what @isidorn said before: work has started and you can expect something "real" soon'ish, likely May.

I have locked this issue because unfortunately unhelpful comments out-weight helpful ones. We have an idea what to do and everyone is invited to provide constructive feedback as soon as this land in insiders. We will be using this feature area label: merge-editor

Thanks for being patient and stay tuned.

gjsjohnmurray referenced this issue Jul 19, 2022
* introduce `--merge` to bring up merge editor (for #5770)

* wait on proper editor when merging

* sqlite slowness

* disable flush on write in tests unless disk tests

* more runWithFakedTimers

* disable flush also in pfs

* introduce `IResourceMergeEditorInput`

* cleanup

* align with merge editor names

* stronger check

* adopt `ResourceSet`

* no need to coalesce

* improve `matches` method
@hediet
Copy link
Member

hediet commented Jul 29, 2022

In the previous release we shipped the basic merge editor (release notes). In the release next week, we are going to enable it by default.
Also, the next release includes CLI arguments to configure VS Code as merge tool.

Please let us know what you think about the new merge editor, so we can continue improving it!

@hediet hediet closed this as completed Jul 29, 2022
@hediet hediet added this to the July 2022 milestone Jul 29, 2022
@hediet hediet added the verified Verification succeeded label Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality merge-editor scm General SCM compound issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests