title | titleSuffix | description | ms.assetid | ms.service | ms.topic | ms.date | monikerRange | ms.subservice |
---|---|---|---|---|---|---|---|---|
Checkout or Edit command |
Azure Repos |
Checkout or Edit command |
377fec8a-bdc5-4e3c-ac8c-79ee85eef4ce |
azure-devops-repos |
reference |
10/17/2022 |
<= azure-devops |
azure-devops-repos-tfvc |
[!INCLUDE version-lt-eq-azure-devops] [!INCLUDE version-vs-gt-eq-2019]
The TFVC checkout
or edit
command checks out a file and changes its pending change status to edit. You can call this command by using either checkout
or edit
.
You can also use Visual Studio to Check out and edit files.
-
If you're beginning a new task, it's a good idea 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's automatically checked out to you.
-
You can view a list of your pending changes at the command prompt by using the Status command.
-
You can work with related data such as comments and associated work items in the Check In dialog box by using the Checkin command.
-
When you're 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 or want to clean your workspace for another task, use the Shelve Command.
-
If you use a server workspace, files that you haven't checked out are read-only.
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. |
The following examples assume that c:\code\SiteApp\Main
is the main folder mapped to the project collection in the user's workspace.
The following example checks out program.cs:
c:\code\SiteApp\Main\SolutionA\Project1\>tf checkout program.cs
The following example checks out program.cs and program2.cs:
c:\code\SiteApp\Main\SolutionA\Project1\>tf checkout program1.cs program2.cs