Download (get) files from the Server
Team Services | TFS 2015 | Visual Studio 2015 | Visual Studio 2013
In general, you should get the latest files from the server on a regular basis so that the code you develop is compatible with the code developed by others on your team and to minimize the risk of creating bugs when you check in your code. You can download the latest version or a previous version of one or more files from your Team Foundation Server to your workspace on your dev machine.
You must be one of the Contributors for your team project. See Team Foundation Server default groups, permissions, and roles.
Get the latest version of some files
You should get the latest files from your server after you set up your dev machine. Then you can begin developing your app.
Later, as you develop functionality in the workspace on your dev machine, your code is isolated from the changes that are made by other developers. But when you are ready (for example, you have completed and checked in the code that completes a task), you should get the latest version of your team’s files.
To get the latest version of some files
- In Solution Explorer or Source Control Explorer, browse to the files or the folders that contain the files that you want to get, select them, open their shortcut menu, and choose Get Latest Version.
Get a specific version of some files
In special cases (for example, to fix a regression bug), you might need to get and work with a specific version of one or more files.
Note: Keep in mind that if you get an older version of a file, make changes to it, and then try to check it in, there is an increased chance that you will need to resolve conflicts before you can complete the check-in.
To get a specific version of some files from the History window
In Solution Explorer or Source Control Explorer, browse to the folder or file, open its shortcut menu, and choose View History.
In the History window, open the shortcut menu of a version and choose Get This Version.
To get a specific version of some files from Solution Explorer or Source Control Explorer
In Solution Explorer or Source Control Explorer, browse to the files or the folders that contain the files you want to get, select them, open their shortcut menu, and choose Get Specific Version.
The Get dialog box appears.
Choose an option from the Type drop-down list:
Date Get a version by specifying a date. If selected, select a date in the Date list.
Latest Version Select this option to get the latest version on the server.
Workspace Version Gets a version by specifying a workspace.
(Optional) Select the Overwrite writable files that are not checked out option.
If selected, files from the server will overwrite all files that do not have the read-only attribute associated with them and are not checked out. Only files on the server, which are different, will overwrite the files in the local workspace. By default, this option is not selected.
Tip: This option is equivalent to running the following command: tf get /overwrite.
(Optional) Select the Overwrite all files even if the local version matches the specified version option.
If selected, files from the server overwrite all files.
Tip: This option is equivalent to running the following command: tf get /force.
Source Control Explorer appears. If you chose Latest Version in step 5, the system updates the Latest column with the status of Yes.
Work from the command prompt
LocalVersions Command Display the version of one or more items in your workspace.
Get command Get files from the server.
When you get files and folders from the server, the system also deletes any checked-in files from your local workspace that have been deleted from the server. Files that have been renamed or moved on the server are changed in your workspace to match the changes on the server.
In Source Control Explorer you can verify whether you have the latest version of a file in the Latest column. You can see specific version information about an item by opening its shortcut menu and choosing Properties.