In VS2022 Community the Git "new branch" command doesn't work

Peter Toye 191 Reputation points
2023-08-16T11:21:28.9366667+00:00

I've created a project and have put it into a local Git repo. I want to create a new branch called "SetClear", so went through the "Git | new Branch" procedure. But it didn't switch to the new branch and looking at the branch list it's not there. See screenshot "VS Git branches". So I tried again, and was told that the branch already existed. See screenshot "VSGit Failure messaage".

So now I'm in a bind: I can't use the branch, but creating a new one doesn't work either. Any ideas how to get out of it?VSGit Failure messaage

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,449 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Peter Toye 191 Reputation points
    2023-08-16T12:15:46.5533333+00:00

    It seems you have to close VS and re-open it before it notices that the Git branch structue has changed. Not impressed.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.