title | titleSuffix | description | ms.assetid | ms.technology | ms.topic | ms.date | monikerRange |
---|---|---|---|---|---|---|---|
Checkout (or Edit) command |
Azure Repos |
Checkout (or Edit) command |
377fec8a-bdc5-4e3c-ac8c-79ee85eef4ce |
devops-code-tfvc |
reference |
08/10/2016 |
>= tfs-2015 |
Azure Repos | Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 | TFS 2017 | TFS 2015 | VS 2017 | VS 2015 | VS 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 Permissions and groups reference.
tf checkout [/lock:(none|checkin|checkout)] [/recursive] [/encoding:encoding] itemspec [/login: username,[password]]
Parameter | Description |
---|---|
/encoding | Ignore this parameter. |
itemspec | Specifies the scope of the items to check out. 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. |
c:\code\SiteApp\Main\SolutionA\Project1\>tf checkout program.cs
Checks out program.cs.
c:\code\SiteApp\Main\SolutionA\Project1\>tf checkout program1.cs program2.cs
Checks out the files program1.cs and program2.cs.
- Check out and edit files Use Visual Studio to check out files.
-
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.
-
When you begin editing a file in a local workspace, it is automatically checked out for you.
-
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.
-
-
When you are ready to check in your changes to the team's codebase on the server, use the Checkin command.
-
If you need to set aside changes (and perhaps also want to clean your workspace for another task), use the Shelve Command.
-
If you use a server workspace, files that you have not checked out are read-only.