Checkout and Edit Commands
Makes the local file writable and changes its pending Change status to "edit" in the workspace. Edit is an alias for the Checkout command.
Any edits made to items that have been checked out are not reflected in the Team Foundation source control server until you perform a check-in operation. For more information, see.
Provides a value for the /type option. Alternatives include the following: Text is an alias for the current windows encoding (Windows-1252 on US systems) or Unicode (based on the BOM, or byte order mark), Binary, and all other file encodings supported by the Windows operating system. You may also use Auto which detects the type for you. For more information, see.
Specifies one or more files to check out. The use of wildcard characters is supported here.
Manually overrides the file encoding that Team Foundation associates with the specified files.
Checks out all files that match the itemspec in the current directory or specified location and subfolders.
Prevents other users from checking in or checking out the specified files. For more information, see.
Before you can check out an item, you must add it to the Team Foundation source control server. For more information about how to set up a local workspace and adding items to source control, see.
Unlike some source control systems, Team Foundation does not get the latest Team Foundation source control server version during a check-out operation. Instead, it makes the current workspace version writable. For more information, see.
You can use tf edit as an alias for checkout.
By default, multiple users can check out the same source-controlled item at the same time. When you use tf to check out an item which has pending changes in another workspace, information about the nature of their change is printed on the command line. In most collaborative development environments, the probability that you will make a change in your workspace that represents a potential merge conflict with a pending change in another workspace or vice versa, is unlikely. Most conflicts that do occur can be resolved automatically by Team Foundation. For those that cannot be resolved automatically, you can use theto safely decide which change, yours or theirs, you want to keep. If you are concerned that another user might make changes in their workspace that conflict with your pending changes, you can use the to monitor other workspaces for newly applied changes. Alternatively, you can use the to prevent other users from checking out or checking in until you have checked in and unlocked your own changes. As a best practice, use the lock command with discretion and notify your teammates why you are doing this, and when you plan to remove the lock.
For the following examples, the current directory is a working folder in a workspace called "Math."
The following example makes 314.cs writable on disk and adds it to the list of pending changes for the Math workspace.
c:\pi> tf checkout 314.cs
The following example checks out both 314.cs and 271.cs.
c:\pi>tf checkout 314.cs 271.cs
The following example checks out page.xsl and changes the encoding property for the Team Foundation file type to specified value. Text is an alias for the current Windows encoding such as Windows-1252.
c:\pi>tf checkout /type:text page.xsl
To use the checkout command, you must have the Check out permission set to Allow and you must be either the workspace owner or have the global Administer workspaces permission set to Allow. If the /lock option is used with a value other than none, having the Lock permission set to Allow is required also. For more information, see.