Git: Use VS Code as merge editor
1.0.0 introduced the ability to use VS Code as a git difftool. The relevant global .gitconfig lines are as follows:
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
How can I use VS Code as a git mergetool?
The relevant arguments it needs to accept, I believe, are $LOCAL, $REMOTE, $BASE, and $MERGED.
Not supported yet.
Is this feature being included in the next iteration, by any chance?
Probably not, this is a big endeavour, since a merge UI needs to be implemented.
Is there any plan for the merge UI to support three-way merging? (e.g. change a, change b, common ancestor)
We wouldn't have it any other way. 😉
Can't upvote this one enough. This is the top scenario for me to fall back to a different editor/IDE (*cough* memory-hog Webstorm cough) :)
If possible, this would be a godsend, due to several reasons:
- Meld, although functional, severely lacks in functionality in relation to configurable key-bindings and colour highlighting, and is really really slow to start on my Windows machine, even when installed on an SSD.
- I'd like the merge editor to also accept the same .editorconfig/settings which my main text editor has, and if vscode does fill that gap, it'd be awesome.
- On smaller levels, the editor theme and familiarity with the interface is also a plus - sometimes I or my team makes mistakes while merging due to no syntax highlighting, which although small, have caused huge bugs in production systems. And some of those mistakes are rather difficult to even fathom until they occur. I guess there would always be similar problems with mergetools, but perhaps they will be reduced if one could merge in the same environment in which one writes.
Like I said, meld is ok, but it'd be super if vscode would some day be used in that scenario.
Visual Studio was always my code merger of choice. Would love to see this feature!
No problem on using other git mergetool but really would like to see own merge UI happen really soon!!
😐 meh.
I expect these features in heavy weight IDEs. In vscode's class of light weight editors (in which I'd consider atom, sublime, etc) I don't. For git-related activities I favor a terminal and vim for conflict resolution. The GUI crowd already has great uni-taskers like meld, diffmerge, kaleidoscope, etc.
@kumarharsh that's a good point about immediate feedback (e.g.; linting.) Going the vim route above, I suppose you can set git's default external editor to vscode... tho could be a pain to provide context to the project-specific linting/syntax/etc rules.
+1
can this feature be implemented as an extension of vscode? or any exists ext recommended.
I dont think so, as i can see extesions are not allowed to create ui features
Enviado do meu telefone Windows 10
De: Tank Sui Enviado:quarta-feira, 7 de dezembro de 2016 10:41 Para: Microsoft/vscode Cc:Herbert Pimentel; Comment Assunto: Re: [Microsoft/vscode] Using VS Code as a git mergetool (#5770)
can this feature be implemented as an extension of vscode? or any exists ext recommended. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
The plugin can provide UI features: look at Git History. It renders a webview, which can "potentially" be used as a merge-tool. But I think it'll be very hard for a plugin to do it without some level of support by vscode itself.
Main issue with kaleidoscope, meld, etc tools is in very typical use-case:
Edit result during merge. Like, you know: accept this line from the left, accept that line from the right, and also, add this small fix so they both can work together.
Captain obvious is reporting: Merge tools are good in merging :D
But editing using i.e meld is totally pain especially when you are get used to such handy tool as vscode. That's why most developers want merge-tool integrated in their editor.
P4merge's 4-pane 3-way merge UI is excellent. http://naleid.com/blog/2013/10/29/how-to-use-p4merge-as-a-3-way-merge-tool-with-git-and-tower-dot-app
allowing us to see the diff (incredibly useful features in an editor) but not giving us a way to merge is very underwhelming
A VS Code extension would be perfect for merging conflicts.
+1
Git side by side conflict resolver not working in latest VS code.
Version 1.10.2 Commit 8076a19fdcab7e1fc1707952d652f0bb6c6db331 Date 2017-03-08T14:02:52.799Z Shell 1.4.6 Renderer 53.0.2785.143 Node 6.5.0