How to: Update the Source in your Workspace

Update source from the server to the local workspace by using the Get command. The Get command is available through Source Control Explorer, Solution Explorer, or the command line by using the Get Command. For more information, see Working with Source Control Workspaces.

A get action will copy files to the local computer if you do not already have them. If the files are already there, a get action will update them if they have changed.

Required Permissions

To perform these procedures, you must have the Read permission set to Allow. For more information, see Team Foundation Server Permissions.

To update the source in your workspace from Source Control Explorer

  1. On the View menu, click Other Windows and then click Source Control Explorer.

  2. In Source Control Explorer, select the folder or file for which you want to update the source to the local workspace and right-click it. Click either Get Latest Version to retrieve the most recent version of the item, or Get Specific Version.

  3. If you click Get Specific Version in the Get dialog box, make sure that the folder or file is selected. In the Version area, in the Type list, select how you want to update the file or folder:

    • Changeset   Get a version based on a changeset. For more information, see How to: Find a Changeset.

    • Date   Get a version based on a date. If selected, click a date in the Date list.

    • Label   Get a version based on a label. For more information, see How to: Find Labels.

    • Latest Version   If selected, updated with the latest version on the Team Foundation source control server.

    • Workspace Version   Gets a version based on the workspace.

  4. (Optional) Click Overwrite writable files that are not checked out to allow the system to overwrite existing files.

  5. (Optional) Click Force get of file versions already in workspace.

  6. Click Get to complete the update. After the file or folder is updated, double-click to open it for editing.

To update the source in your workspace from Solution Explorer

  1. In Solution Explorer, right-click the solution, project, or individual file that you want to update the source on. Click either Get Latest Version to retrieve the most recent version of the item, or Get Specific Version… to retrieve a specific version.

  2. If you click Get Specific Version… in the Get dialog box, make sure that the folder or file is selected and in the Version area, in the Type drop-down list, select the desired manner by which you want to update:

    • Changeset   Get a version based on a changeset. For more information, see How to: Find a Changeset.

    • Date   Get a version based on a date. If selected, click a date in the Date list.

    • Label   Get a version based on a label. For more information, see How to: Find Labels.

    • Latest Version   If selected, updated with the latest version on the Team Foundation source control server.

    • Workspace Version   Gets a version based on the workspace.

  3. (Optional) Click Overwrite writable files that are not checked out to allow the system to overwrite existing files.

  4. (Optional) Click Force get of file versions already in workspace.

  5. Click Get to complete the update. After the file or folder has been updated, double-click to open it for editing.

To update the source in your workspace from the command line

  1. Click Start, click All Programs, and point to Microsoft Visual Studio 2005.

  2. Point to Visual Studio Tools and then click Visual Studio Command Prompt.

  3. Type cd path, where path is the location of the directory used to store your personal copy of the files on the server, for example, c:\projects.

  4. Type tf get itemname and then press Enter.

    Note

    For the full syntax available for the Get command, see Get Command.

See Also

Reference

Get Command

Concepts

Working with Source Control Changesets

Other Resources

Getting a Local Copy of Files from the Source Control Server