Does anyone know why all my Git branches disappeared on Visual Studio Community 2019?

Shehan Senanayaka
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 28, 2022

I have been working on a project for a few weeks now. I was able to successfully clone a Git repository and create other branches and work on them. A few days ago, all my branches stopped showing. When I open the project, it says opening repository and it shows the correct one. When I look at Git > Local Repositories it shows this one as well. However, when I try to look at the branches, it shows nothing for both the Remotes and Locals. The New Branch button is disabled as well. I right clicked the VS solution and clicked on Open in Terminal and then did git branch -a. This showed all my branches. I just don't know why the application says No Branches in Git Changes. The Fetch, Pull and Push buttons are disabled too.

1 answer

0 votes
Peter Anania
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 11, 2023

This is just a shot in the dark, but sometimes VS forgets that it is using the Git Flow workflow and asks you to connect to the repository, as it used to in TFS. If you go to the Team Explorer tab (Team Explorer Home) and click the Git Changes button that sets back.

Hope that helps, Peter

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events