Error: Remote branch created on VSTS does not appear in Visual Studio

We recently came across this problem. One of the developers had created a new branch in the one of the source code repositories hosted on the Visual Studio Team Services aka VSTS. Other developers were unable to see this newly created branch in their visual studio team explorer pane:

Branches on the visual studio team services
Branches on the visual studio team services

And below are the branches on the team explorer:

Branches on the team explorer pane
Branches on the team explorer pane

After trying few things, it turned out that you need to fetch the latest commit from master using either fetch or sync inside visual studio:

Options inside sync settings
Options inside sync settings

Once its done, it will show the newly created branches and then you can checkout them. Alternatively, you can open command line explorer from inside visual studio and then do a ‘git fetch’. The problem here is that your local client doesn’t know when the server updates; you have to pull data from it for the server to give you data. Hence a fetch is needed if a new branch is made on the server.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s