UNDOCHANGE
Undo changes on a path with the Unity Version Control CLI.
Read time 1 minuteLast updated 21 days ago
Description
Undoes the changes on a path.Usage
cm undochange | unc <item_path>[ ...] [-R | -r | --recursive]
Options
Option / Argument | Description |
|---|---|
| -R | -r | --recursive | Applies the operation recursively. |
| item_path | Items to apply the operation. Use a whitespace to separate paths. Use double quotes (" ") to specify paths containing spaces. Use . to apply the operation to the current directory. |
Help
Remarks
If an item is checked out or modified but not checked in and you do not want to check it in, you can undo the changes using this command. The item will be updated to the contents it had before.Reading input from stdin
The 'undochange' command can read paths from stdin. To do this, pass a single dash "-". Example:Paths will be read until an empty line is entered. This allows you to use pipe to specify for which files to undo changes. Example:cm undochange -
dir /S /B *.c | cm undochange -Examples
(Undoes changes of the files on the current directory.)cm unc .
(Undoes changes of the files recursively on the current directory.)cm undochange . -R
(Undoes changes of the selected files.)cm unc file1.txt "file 2.txt"
(Undoes changes of the selected file.)cm unc c:\workspace\file.txt