A workspace is a local copy of the files and folders on the server, plus any changes that you have made locally. When you add, edit, delete, move, rename, or otherwise change any version-controlled item, your changes are isolated in your workspace where you can make and test your changes. Your pending changes are committed to the server and become available to other users outside your workspace when you perform a check-in.
For more information on how to find the tf command-line utility, see Tf Command-Line Utility Commands.
Creating a new workspace
Before you can add files to the version control server or check out items on the server in order to edit them, you must create a workspace or associate an existing one with the current directory. For more information, see How to: Create a Mapped Workspace.
To make the current directory a working folder for an existing workspace on your computer, type tf workspace workspacename, where workspacename is the name of the existing workspace. The Edit Workspace dialog box appears. Click click here to enter a new working folder, type the server path for which you want to map the current directory in the Source Control Folder box, type the current directory in the Local Folder box, and click OK.
When you create a new workspace, you can specify a template workspace as part of the /new option. When you specify a template workspace, Team Foundation creates a new workspace on the current computer, sets the owner to the current owner, and replicates the following workspace properties into the new workspace from the template workspace: mappings and comment. If no name is specified, the system uses a name based on the current computer name. When you create a workspace using a template, Team Foundation does not retrieve the files to which it maps from the server. Use the Get Command to synchronize the new workspace with the latest version on the server.
Single Folder Mapping
You can choose to map only the immediate children of a version control folder to a local workspace. To do this, add an asterisk wild-card character in the Source Control Folder box in the Add Workspace dialog box. For example, $/folder/*. Otherwise, by default, all the children of the version control folder are recursively mapped to the local workspace.
Single folder mapping within a version control hierarchy is useful because it limits the number of items downloaded to the client computer. Another way to limit downloaded files is to cloak files that you do not need to have in your workspace. For more information, see How to: Cloak and Uncloak Folders in a Workspace. This provides faster download times and saves disk space on the client computer.
Deleting a Workspace
If you delete a workspace that contains pending changes, Team Foundation cancels the pending changes as part of the delete process. Deleting a workspace does not delete the files and folders on the client computer that were in that workspace.
Editing a Workspace
You can change the following workspace attributes:
Workspace Name
Comment
Working folder mappings
If no workspace specification is provided, the workspace for the current folder is used.