기술 자료

​
​

Development

User Acquisition

Monetization

산업 분야

Unity Version Control

DevOps

On-prem

Gluon

Editor plug-in

Open Unity Dashboard

Unity Version Control

이 페이지는 선택한 언어로 제공되지 않습니다.
​
​
Unity Version Control
  • Overview
  • Cloud Repositories organization update
  • Installation
  • Use UVCS with the Unity Editor
  • Unity Version Control plugins
  • Concepts
  • Tutorials
  • On-Prem
  • Gluon
  • CLI and shortcut references
    • Unity Version Control CLI
      • acl
      • activateuser
      • add
      • admin
      • annotate
      • api
      • applylocal
      • archive
      • attribute
      • autocomplete
      • branch
      • changelist
      • changerevisiontype
      • changeset
      • changeuserpassword
      • checkconnection
      • checkin
      • checkout
      • checkselectorsyntax
      • clone
      • codereview
      • configure
      • crypt
      • deactivateuser
      • diff
      • diffmetrics
      • fastexport
      • fastimport
      • fileinfo
      • find
      • getconfig
      • getfile
      • getrevision
      • getstatus
      • gettaskbranches
      • getworkspacefrompath
      • getworkspaceinfo
      • help
      • history
      • iostats
      • issuetracker
      • label
      • licenseinfo
      • linktask
      • list
      • listusers
      • location
      • lock
      • log
      • merge
      • move
      • objectspec
      • partial
      • patch
      • profile
      • pull
      • purge
      • push
      • query
      • remove
      • repository
      • revert
      • setowner
      • shelveset
      • show-find-objects
      • showacl
      • showcommands
      • showowner
      • showpermissions
      • support
      • switch
      • sync
      • trigger
      • tube
      • undelete
      • undo
      • undochange
      • undocheckout
      • undocheckoutunchanged
      • update
      • version
      • whoami
      • workspace
      • workspacestatus
      • xlink
    • CLI help
    • Pipe commands
    • cm find
    • Windows keyboard shortcuts
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

UNDO

Undo changes with the Unity Version Control CLI.
읽는 시간 4분
최근 업데이트: 10달 전

Description

Undoes changes in a workspace.

Usage

cm undo [<path>[ ...]] [--symlink] [-r | --recursive] [<filter>[ ...]] [--silent | --machinereadable [--startlineseparator=<sep>] [--endlineseparator=<sep>] [--fieldseparator=<sep>]]

Options

Option / Argument

Description

--symlinkApplies the undo operation to the symlink and not to the target.
-rExecutes the undo recursively.
--silentDoes not show any output.
--machinereadableOutputs the result in an easy-to-parse format.
--startlineseparatorUsed with the '--machinereadable' flag, specifies how the lines should start.
--endlineseparatorUsed with the '--machinereadable' flag, specifies how the lines should end.
--fieldseparatorUsed with the '--machinereadable' flag, specifies how the fields should be separated.
pathPath of the files or directories to apply the operation to. Use double quotes (" ") to specify paths containing spaces. Use a whitespace to separate paths. If no path is specified, by default the undo operation will take all of the files in the current directory.
filterApplies the specified filter or filters to the given paths. Use a whitespace to separate filters. See the Filters section for more information.

Help

Remarks

  • If no path is specified, it will undo every change in the current directory but not recursively.
  • If one or more paths are specified, it will undo every change in the specified paths but not recursively.
  • If you want the operation to be recursive, you must specify the '-r' flag. To undo all of the changes below a directory including changes affecting the directory itself, run the following command:
cm undo dirpath -r
If dirpath is a workspace path, every change in the workspace will be undone.
  • The 'undo' command is dangerous because it undoes work irreversibly. Once the undo has finished, it is not possible to recover the previous state of the files and directories affected by it.
  • Consider the following scenario:
  • /src
    • file.txt
    • code.cs
    • /test
      • test_a.py
      • test_b.py

These commands are equivalent when executed from the /src directory

cm undo
cm undo *
cm undo file.txt code.cs /test

These commands are also equivalent when executed from the /src directory

cm undo .
cm undo /src file.txt code.cs

Filters

The paths can be filtered using one or more of the filters below. Each of those filters refers to a type of change:

Option / Argument

Description

--checkedoutSelects checked-out files and directories.
--unchangedSelects files whose content is unchanged.
--changedSelects locally changed or checked-out files and directories.
--deletedSelects deleted files and directories.
--movedSelects moved files and directories.
--addedSelects added files and directories.
If the path matches one or more of the specified kinds of changes, those types of changes will be undone on that said path. For example, if you specify both '--checkedout' and '--moved', if a file is both checkedout and moved, both changes will be undone.
If no filter is specified, all kinds of changes are undone.

Deleted items

To undo file and directory deletions, you must either specify the full path of the item, or specify the containing directory and use the recursive ('-r') flag.

For example

cm undo .
(Does NOT undo deletions (but other changes) in the current directory.)
cm undo . -r
(Undoes all deletions (and other changes) in the current directory recursively.)
cm undo src/file.txt
(Undoes deletion (or other change) of src/file.txt.)

Examples

cm undo . -r
(Undoes all changes in the current directory recursively. If executed from the workspace's root, undoes all changes in the entire workspace.)
cm co file.txt
cm undo file.txt
(Undoes the checkout on 'file.txt'.)
cm undo c:\otherworkspace\file.txt
(Undoes changes in file 'file.txt' located in a workspace other than the current one.)
echo content >> file.txt
cm undo file.txt
(Undoes the local change to 'file.txt'.)
cm undo src
(Undoes changes to the src directory and its files.)
cm undo src/*
(Undoes changes in every file and directory contained in src, without affecting src.)
cm undo *.cs
(Undoes changes to every file or directory that matches *.cs in the current directory.)
cm undo *.cs -r
(Undoes changes on every file or directory that matches *.cs in the current directory and every directory below it.)
cm co file1.txt file2.txt
echo content >> file1.txt
cm undo --unchanged
(Undoes the checkout of unchanged 'file2.txt', ignoring locally changed 'file1.txt'.)
echo content >> file1.txt echo content >> file2.txt
cm co file1.txt
cm undo --checkedout
(Undoes the changes in checked-out file 'file1.txt', ignoring 'file2.txt' as it is not checked-out.)
cm add file.txt
cm undo file.txt
(Undo the add of 'file.txt' making it once again a private file.)
rm file1.txt echo content >> file2.txt
cm add file3.txt
cm undo --deleted --added *
(Undoes the 'file1.txt' delete and 'file3.txt' add, ignoring the 'file2.txt' change.)

Copyright © 2026 Unity Technologies
법률 정보개인정보 처리방침쿠키Documentation Terms of Use개인 정보 판매 또는 공유 금지개인정보 보호 선택(쿠키 설정)

'Unity', Unity 로고 및 기타 Unity 상표는 미국 및 기타 지역 내 Unity Technologies 또는 그 계열사의 상표 또는 등록상표입니다(자세한 내용은 여기에서 확인하세요). 기타 명칭 또는 브랜드는 해당 소유자의 상표입니다.

일부 페이지는 편의를 위해 기계 번역되었으며 부정확한 내용이 있을 수 있습니다. 정보가 상충되는 경우, 영어 버전을 우선으로 참조하세요.

  • 보고 있는 페이지
    • Description

      • Usage

      • Options

    • Help

      • Remarks

        • These commands are equivalent when executed from the /src directory

        • These commands are also equivalent when executed from the /src directory

      • Filters

      • Deleted items

        • For example

      • Examples


이 페이지의 문제 보고