variable
variable

Reputation: 9664

How to view the new GIT branch from remote server in visual studio?

I am using visual studio 2017 and GIT.

I can connect to the GIT project, branch and pull the code.

But when a new branch is created on remote server, it cannot be seen in visual studio branches section.

How to view the new GIT branch from remote server in visual studio?

Upvotes: 2

Views: 689

Answers (1)

VonC
VonC

Reputation: 1324258

The Team Explorer view (you can see here) should show you those branches under remotes/origin.

But you need to fetch first, before being able to see them in that section.

http://sofes.miximages.com/git/nBNIR.png

(image from "Git Fetch Upstream en Visual Studio 2017")

(this is an example for upstream, but in your case, select origin)

This assumes your local repository uses the default refpect

[remote "origin"]
    url = https://github.com/schacon/simplegit-progit
    fetch = +refs/heads/*:refs/remotes/origin/*

That would fetch all branches, included newly created ones on the remote repository.

Upvotes: 2

Related Questions