Search code examples
gittfsvisual-studio-2019git-pushgit-pull

Git Sync in Visual Studio 2019


I am using the Sync action from Visual Studio 2019 for getting artifacts from a git server. I know that Sync first is doing a pull operation and after that a push operation to the git server; but in my case it does not work like expected.

If I press Sync I'm receiving this message

img

But after that if I press Fetch I would expect see nothing from incoming commits, even though I'm seeing 2 incoming commits.

Any idea for this behavior?


Solution

  • As yan commented, you should first check if it's a stable scenario. If you could reproduce this issue stably.

    • sync: performs a git pull and a git push.
    • fetch: performs a git fetch which retrieves any commits on from your remote without merging them.

    This is not an expect behavior. You could use git reflog command to track the logs and check if there is some useful information.

    You could also have a try with remote git repo hosted by other sever such as GitHub. This will narrow down if it's a client side issue.

    Also upgrade your VS2019 to latest version, which may do the trick.