Visual Studio Community 2022 can't open Git repository

Antonio Benetazzo 0 Reputation points
2025-02-12T14:59:27.03+00:00

From some days ago Visual Studio Community 2022 can't open the Git repository in my solution. If I click on "Select Repository" I can see it but even if I click on it nothing happens.Screenshot 2025-02-12 155331

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

1 answer

Sort by: Most helpful
  1. Michael Taylor 56,946 Reputation points
    2025-02-12T16:18:54.94+00:00

    VS just uses the CLI to read your local Git repo information. If it isn't showing anything then I wonder about your local repo information. I assume you have Git for Windows installed.

    1. Go to the directory containing your Git repo.
    2. Run git status and it should show you the current status. If you get nothing back then your local Git repo directory is corrupt.
    3. Run git pull to update any changes from Github/Azure DevOps.
    4. Run git checkout -b 'test' to create a test branch.
    5. Switch back to VS and see what Git Changes says.

    Check your Git options in VS.

    1. Ensure the credential helper is GCM
    2. Optionally disable the multi-repo option to see if the problem goes away

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.