CHECKOUT
Check out files with the Unity Version Control CLI.
Read time 2 minutesLast updated 21 days ago
Description
Marks files as ready to modify.Usage
cm checkout | co [<item_path>[ ...]] [-R | -r | --recursive] [--format=<str_format>] [--errorformat=<str_format>] [--resultformat=<str_format>] [--silent] [--symlink] [--ignorefailed] [--machinereadable [--startlineseparator=<sep>] [--endlineseparator=<sep>] [--fieldseparator=<sep>]]
Options
Option / Argument | Description |
|---|---|
| item_path | Items to be checked-out. Use double quotes (" ") to specify paths containing spaces. Use a whitespace to separate item paths. Use . to apply checkout to current directory. |
| -R | Checks out files recursively. |
| --format | Retrieves the output progress message in a specific format. Check the examples for more information. |
| --resultformat | Retrieves the output result message in a specific format. Check the examples for more information. |
| --silent | Does not show any output at all. |
| --symlink | Applies the checkout operation to the symlink and not to the target. |
| --ignorefailed | If an item cannot be locked (the exclusive checkout cannot be performed), the checkout operation will continue without it. |
| --machinereadable | Outputs the result in an easy-to-parse format. |
| --startlineseparator | Used with the '--machinereadable' flag, specifies how the lines should start. |
| --endlineseparator | Used with the '--machinereadable' flag, specifies how the lines should end. |
| --fieldseparator | Used with the '--machinereadable' flag, specifies how the fields should be separated. |
Help
Remarks
To checkout an item
- The item must be under source code control.
- The item must be checked-in.
cm lock listReading input from stdin
The 'checkout' command can read paths from stdin. To do this, pass a single dash "-". Example: cm checkout - Paths will be read until an empty line is entered. This allows you to use pipe to specify which files to checkout. Example:dir /S /B *.c | cm checkout -Examples
(Checkouts 'file1.txt' and 'file2.txt' files.)cm checkout file1.txt file2.txt
(Checkouts all txt files.)cm co *.txt
(Checkouts current directory.)cm checkout .
(Recursively checkouts 'src' folder.)cm checkout -R c:\workspace\src
(Checkouts 'file.txt' using the specified formatting strings to show the progress and the result of the operation.)cm co file.txt --format="Checking out item {0}" --resultformat="Item {0} checked out"
(Checkouts the symlink file and not the target.)cm checkout link --symlink
(Recursively checkouts the current folder, ignoring those files that can not be checked out.)cm checkout . -R --ignorefailed
(Checkouts the current directory, and prints the result in a simplified, easier-to-parse format, starting the lines with the specified strings.)cm co . --machinereadable --startlineseparator=">"