Checkout (or Edit) command

Visual Studio Team Foundation Server 2013

Checks out a file and changes its pending change status to Edit. You can call this command using either Checkout or Edit.

Requirements: See Permission reference for Team Foundation Server.

tf checkout [/lock:(none|checkin|checkout)] [/recursive] [/encoding:encoding] itemspec [/login: username,[password]]

Parameters

Parameter

Description

/encoding

Ignore this parameter.

itemspec

Specifies the scope of the items to check in. For syntax, see Use Team Foundation version control commands.

/lock

Applies or removes a lock. See Use Team Foundation version control commands.

/login:username,[password]

Specifies the user account to run the command. See Use Team Foundation version control commands.

/recursive

Recursively checks out items in the specified directory and any subdirectories.

Examples

Check out a single item

 Copy imageCopy Code
c:\code\SiteApp\Main\SolutionA\Project1\>tf checkout program.cs

Checks out program.cs.

Check out two items

 Copy imageCopy Code
c:\code\SiteApp\Main\SolutionA\Project1\>tf checkout program1.cs program2.c

Checks out the files program1.cs and program2.c.

Work in Visual Studio

  • Check out and edit files Use Visual Studio to check out files.

Tips

  • Tip If you are beginning a new task, it's probably a good idea for you to download the latest files from the server before you check out files and begin your work. See

Get command.
  • Tip When you begin editing a file in a local workspace, it is automatically checked out for you.

  • Tip You can view a list of your pending changes:

    • And work with related data such as Comments and Associated Work Items in the Check In dialog box using the Checkin command.

    • At the command prompt by using the Status command.

  • Tip When you are ready to check in your changes to the team's codebase on the server, use the Checkin command.

  • Tip If you need to set aside changes (and perhaps also want to clean your workspace for another task), use the Shelve Command.

  • Tip If you use a server workspace, files that you have not checked out are read-only.