Home > Mobile >  Merge candidate branch in origin/master to master in Visual Studio
Merge candidate branch in origin/master to master in Visual Studio

Time:09-14

Here is a screen shot of the branches for a repo from Visual Studio's Git Repo pane

Branches

For a task a branch was created from master (the one with green arrow) and after the PR it got merged into 'candidate' in 'remote/origin'

Now how to merge the candidate into master(the one with green arrow below the Repo symbol at the top).

Here are the options on master(green)

enter image description here

Options on master(blue)

enter image description here

Options for candidate blue

enter image description here

New Git user here.

Thanks in advance.

CodePudding user response:

Checkout master (according to your screenshot you already have). Then pull origin/candidate into master.

I guess usually you would wait for the remote master to merge candidate and then pull origin/master into master and for the time being you would checkout origin/candidate so your local branch names match the remote branch names. At least that would cause less confusion for me.

CodePudding user response:

Without asking about the strategy you're following in your team.. I wonder why the option merge origin/candidate into master is disabled! You could

  1. Restart Visual Studio and wait untill no background processes are there.
  2. Right click on local master -> fetch and wait.
  3. Right click on Remote candidate -> merge origin/candidate into master -> Ok.

Note: keep an eye on output window in visual studio -> select 'Source Control - Git' to see git commands output.

  • Related