How to synchronize your computer with TFS

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

To synchronize your computer with the version control server, use the tf get command. This is a quick way of ensuring that your computer is synchronized with the rest of your team to ensure that you have the latest copy of shared work. To download all files and not just those that are out of date, run the following command from a Visual Studio 2005 command prompt window:

tf get /all

When you use this command, any local writable files that you might have on your computer are not overwritten. If you want to overwrite local writable files to completely synchronize your computer with the server, use the /force switch as follows:

tf get /force

Although this command overwrites local writable files, it does not overwrite writable files for which you also have pending edits. If you have pending edits on a file that you need to keep, check in or shelve your edits prior to re-synchronizing with the server.

To perform the same operation from Visual Studio:
  1. In Team Explorer, double-click the Source Control folder, right-click your server or team project, and then click Get Specific Version.
  2. Select Overwrite writable files that are not checked out and Force get of file versions already in workspace.
  3. In the Type drop-down list, ensure that Latest Version is selected, and then click Get.

If you want to completely synchronize your computer with the version control server, do not use the Get Latest Version option available in Visual Studio. Because this command only downloads those files that are not already in your workspace and does not overwrite writable files that you have checked out in your local directory, your computer remains out of synchronization with the server.

Additional Resources

Last edited Jul 31, 2007 at 1:57 PM by prashantbansode, version 7

Comments

No comments yet.