Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

vscode - Merge one branch into another

Is it possible to merge one branch into another using the vscode interface and not the terminal? or is there any extension that makes this possible?
using vscode v1.13.0
Thanks in advance.

like image 372
Shahar Kazaz Avatar asked Jun 14 '17 11:06

Shahar Kazaz


People also ask

How do I merge a branch in another branch in Visual Studio?

The way to merge development_print branch into master branch as below: VS -> Team Explorer -> Branches -> double click master branch -> Merge -> select development_print for Merge from branch -> Merge.

How do I merge a branch into another branch?

To merge branches locally, use git checkout to switch to the branch you want to merge into. This branch is typically the main branch. Next, use git merge and specify the name of the other branch to bring into this branch. This example merges the jeff/feature1 branch into the main branch.


2 Answers

I have created an extension which is available under the name: Git Merger in the vscode marketplace.

like image 55
Shahar Kazaz Avatar answered Nov 04 '22 07:11

Shahar Kazaz


Use Git: merge branch command

VSCode now has built-in branch merge support.
see In Visual Studio Code How do I merge between two local branches?

Press Ctrl/Cmd+Shift+P (Or View > Command Palette...) and look for Git: merge branch.

You select the branch to merge from (if you have a workspace open, the command lets you choose the project within the workspace).
Conflict management is also implemented, highlighting the Git conflict markers (see link above).
The branch gets merged with the commit message "Merged branch '[branchname]'"

like image 29
Peter Krebs Avatar answered Nov 04 '22 07:11

Peter Krebs