Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Published Git branch in Azure DevOps not showing in VS2013 or Git Command Line

My co-worker has a local branch. He "publishes" it from VS Team Explorer. It shows up in Visual Studio Online's list of branches.

I am connected to the same TFS-Git system, logged in via VS, connected via Team Explorer, and yet when I view the list of branches I can clone from it is not there.

I finally resorted to using the command line to view all branches, but it doesn't even show up there. Here's a screenshot:

enter image description here

What am I missing? This is a serious problem for us.

Thanks in advance.

UPDATE

I'm not certain what did it, but I can now see the branch in Team Explorer. My best guess is that it had to do with issuing a manual "fetch" of the "master" and "development" branches. I'm surprised that would be required to see remote branches. It's essentially like you have to fetch and cache the remote branch info, then issue another command (branch -r) to see what you cached. That may not be what happened, but it's my best guess. I hope it helps someone else.

like image 384
Andrew Lundgren Avatar asked Oct 15 '14 18:10

Andrew Lundgren


People also ask

How do I pull a branch from Azure DevOps?

Open the Team Explorer and open the Sync view. Then select the Pull link under Incoming Commits to pull remote changes and merge them into your local branch. Pulling updates files in your open project, so make sure to commit your changes before pulling.

Why is my branch not showing in VS code?

We have determined that this issue is not a bug. To see the new created branches in web site, please pull or sync your local repository first. Then you will see the new branch.


1 Answers

You will need to first do a Pull to make sure you local repo is up to date with the changes. You then have the new origin\otherdudes branch pointers locally.

Then you can create a new branch in visual studio and select the origin\otherdudes branch as the server target.

This is just how git works and the same actions from the command line will also do the same thing. You always need to create a working copy of a published branch before you can edit it.

like image 189
MrHinsh - Martin Hinshelwood Avatar answered Nov 02 '22 11:11

MrHinsh - Martin Hinshelwood