What does Sync Do in Team Explorer?

15,857

Solution 1

Git in Visual Studio, VSTS, and TFS is standard Git. Although Sync isn’t a Git command, some GUI environments provide a sync button to both update your local files and push your local changes to your remote (your hosted repository).

enter image description here

The Sync button is available on the Team Explorer pane and and also displayed after you create a commit using the extension. The sync tool enables you to select how you want to update the project:

  • 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.
  • pull: performs a git pull.
  • push: performs a git push.

You can also navigate to the Synchronization view from the Changes view by choosing Sync immediately after making a commit.

enter image description here

Solution 2

Sync is a combination of a Pull Command followed by a Push command. It will 1st perform a Pull, and if there are no conflicts, will then Push the current branch. It is meant as a quick way to just get your current branch into sync with the remote branch.

Share:
15,857

Related videos on Youtube

Josh Monreal
Author by

Josh Monreal

Updated on November 08, 2022

Comments

  • Josh Monreal
    Josh Monreal over 1 year

    I am currently in a project that uses TFS Git as the code repository. In Visual Studio, under Team Explorer -> Sync, there is an option called Sync. Now I am familiar with the Fetch, Pull, and Push actions but Sync is new to me.

    Any ideas what this does behind the scenes?