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 source-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.
Creating a new workspace
Before you can add files to the source 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 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, click click here to enter a new working folder, type the server path of which you want to map the current directory in the Team Foundation source control server Folder box, type the current directory in the Local Folder box, and then 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, a name based on the current computer name is used. 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.
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.