PARTIAL ADD
Add items to a partial replica with the Unity Version Control CLI.
Read time 1 minuteLast updated 21 days ago
Description
Adds an item to version control.Usage
cm partial add [-R | -r | --recursive] [--silent] [--parents] [--ignorefailed] [--skipcontentcheck] <item_path>[ ...] [--format=<str-format>] [--errorformat=<str-format>]
Options
Option / Argument | Description |
|---|---|
| -R | -r | --recursive | Adds items recursively. |
| --silent | Does not show any output. |
| --parents | Includes the parent directories of the items specified in the operation. |
| --ignorefailed | If an item cannot be added, the add operation will continue without it. Note: If a directory cannot be added, its content is not added. |
| --skipcontentcheck | When the extension is not enough to set the file as text or binary, it will be set as binary by default instead of checking the content to detect the type. |
| --format | Retrieves the output message in a specific format. Check the examples for more information. |
| --errorformat | Retrieves the error message (if any) in a specific format. Check the examples for more information. |
| item_path | Items to add. Use double quotes (" ") to specify paths containing spaces. Use a whitespace to separate paths. Use * to add all the contents of the current directory. |
Help
Remarks
Requirements to add items
- The parent directory of the item to add must be previously added.
Examples
(Adds 'pic1.png' and 'pic2.png' items.)cm partial add pic1.png pic2.png
(Adds 'picture.png' item in path 'c:\workspace'.)cm partial add c:\workspace\picture.png
(Recursively adds 'src'.)cm partial add -R c:\workspace\src
(Adds 'design01.png' file and 'samples' parent folder.)cm partial add --parents samples\design01.png
(Recursively adds all the contents of the current directory.)cm partial add -R *
(Recursively adds all the contents of the current directory, printing 'ADD <item />' for successfully added files, and 'ERR <item />' for items that could not be added.)cm partial add -R * --format="ADD {0}" --errorformat="ERR {0}"