In Visual Studio Code How do I merge between two local branches?
You can do it without using plugins.
In the latest version of vscode that I'm using (1.17.0) you can simply open the branch that you want (from the bottom left menu) then press ctrl+shift+p
and type Git: Merge branch
and then choose the other branch that you want to merge from (to the current one)
Update June 2017 (from VSCode 1.14)
The ability to merge local branches has been added through PR 25731 and commit 89cd05f: accessible through the "Git: merge branch
" command.
And PR 27405 added handling the diff3-style merge correctly.
Vahid's answer mention 1.17, but that September release actually added nothing regarding merge.
Only the 1.18 October one added Git conflict markers
From 1.18, with the combination of merge command (1.14) and merge markers (1.18), you truly can do local merges between branches.
Original answer 2016:
The Version Control doc does not mention merge commands, only merge status and conflict support.
Even the latest 1.3 June release does not bring anything new to the VCS front.
This is supported by issue 5770 which confirms you cannot use VS Code as a git mergetool
, because:
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.
That leaves the actual merge to be initiated from command line only.