Visual Studio 2022 is not aware of updates on GitHub

Josef Szeliga 20 Reputation points
2023-07-31T23:14:23.7866667+00:00

Hi,

I have a project in VS2022 setup both at home and at work.

At the end of the working day, I will update the git hub repository with my changes.

When I get home, I open the same project in VS2022.

Neither the "Git changes" nor the "git repositories" windows show that I need to pull down new changes.

Yet I am certain that these changes exist and can see them on GitHub web site.

I can see previous changes in VS using "git repositories" view.

Things I have done.

Close and restart VS

Refresh the "Git Repository" window.

Check that I am on the correct branch (main)

Confirmed GitHub url's are identical for the solution at home and work.

In the end I opened the VS2022 developer console and ran the following command ""git pull origin main". Straight away the changes updated my local work files.

Why isn't my home VS2022 "git change" and "git repository" views being updated by github changes?

J

Developer technologies | Visual Studio | Other
{count} votes

Accepted answer
  1. Tianyu Sun-MSFT 34,446 Reputation points Microsoft External Staff
    2023-08-17T10:01:57.92+00:00

    Hi @Josef Szeliga ,

    If you mean "auto fetch"(periodically check GitHub), I’m afraid, Visual Studio currently doesn’t support this feature.

    Please kindly upvote this ticket: Add automatic git fetch like supported in VS Code, follow up and wait for the latest information there.

    Currently, you may try to use some extension instead, just for example: GitAutoFetch.

    Thanks for your understanding and thanks for helping us make Visual Studio better.

    Sincerely,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. S.Sengupta 24,636 Reputation points MVP
    2023-08-01T00:35:16.6733333+00:00

    If you suspect that the remote repository has changes that are not reflected in your local repository, try pulling the latest changes from the GitHub repository using the following command:

    git pull origin <branch_name>

    Replace <branch_name> with the name of the branch you want to update.

    Ensure that you are using the latest version of Visual Studio. Sometimes, issues are fixed in newer updates.

    If you have any Git-related extensions installed, try disabling them temporarily to see if they are causing the issue.


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.