CHECKIN
Check in changes with the Unity Version Control CLI.
Read time 2 minutesLast updated 21 days ago
Description
Stores changes in the repository.Usage
cm checkin | ci [<item_path>[ ...]] [-c=<str_comment> | -commentsfile=<comments_file>] [--all|-a] [--applychanged] [--private] [--update] [--symlink] [--noshowchangeset] [--machinereadable [--startlineseparator=<sep>] [--endlineseparator=<sep>] [--fieldseparator=<sep>]]
Options
Option / Argument | Description |
|---|---|
| item_path | Items to be checked-in. Use double quotes (" ") to specify paths containing spaces. Use a whitespace to separate item paths. Use . to apply checkin to current directory. |
| -c | Applies the specified comment to the changeset created in the checkin operation. |
| -commentsfile | Applies the comment in the specified file to the changeset created in the checkin operation. |
| --all | -a | The items changed, moved and deleted locally on the given paths are also included. |
| --applychanged | Applies the checkin operation to the changed items detected in the workspace along with the checked out items. |
| --private | Private items detected in the workspace are also included. |
| --update | Processes the update-merge automatically if it eventually happens. |
| --symlink | Applies the checkin operation to the symlink and not to the target. |
| --noshowchangeset | Doesn't print the result changeset. |
| --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
- If <item_path> is not specified, the checkin involves all the pending changes in the workspace.
- The checkin operation is always applied recursively from the given path.
- To checkin an item:
- The item must be under source code control.
- If the item is private (not under source code control), the --private flag is necessary in order to checkin it.
- The item must be checked out.
- If the item is changed but not checked out, the --applychanged flag is not necessary unless <item_path> is a directory or it contains wildcards ('*').
Reading input from stdin
The 'checkin' command can read paths from stdin. To do this, pass a single dash "-". Example: cm checkin - Paths will be read until an empty line is entered. This allows you to use pipe to specify which files to checkin. Example:dir /S /B *.c | cm checkin --all -Examples
(Checkins the 'file1.txt' and 'file2.txt' checked-out files.)cm checkin file1.txt file2.txt
(Checkins the current directory and sets the comment in the 'mycomment.txt' file.)cm checkin . -commentsfile=mycomment.txt
(Checkins the symlink file and not the target.)cm checkin link --symlink
(Checkins 'file1.txt' and includes a comment.)cm ci file1.txt -c="my comment"
(Lists the paths in the changelist named 'pending_to_review' and redirects this list to the input of the checkin command.)cm status --short --compact --changelist=pending_to_review | cm checkin -
(Checkins the current directory, and prints the result in a simplified, easier-to-parse format.)cm ci . --machinereadable
(Checkins the current directory, and prints the result in a simplified, easier-to-parse format, starting and ending the lines, and separating the fields with the specified strings.)cm ci . --machinereadable --startlineseparator=">" --endlineseparator="<" --fieldseparator=","