ドキュメント

Unity Version Control

WORKSPACE MOVE

Find the arguments you can use to move a workspace to another directory on the same volume with the Unity Version Control CLI.
読み終わるまでの所要時間 2 分最終更新 13日前

Description

Moves a workspace to another directory on the same volume. To move a workspace to a different volume, refer to Move a workspace to a different volume.

Usage

To move the current workspace, specify the new path:
cm workspace move <new_path>
To move a different workspace, specify the workspace before the new path:
cm workspace move <workspace_spec> <new_path>
You can shorten
cm workspace
to
cm wk
, and
move
to
mv
.

Options

Option or argument

Description

workspace_spec
Specification of the workspace to move. For more information about specs, refer to objectspec.
new_path
The path to move the workspace to. It must be on the same volume as the workspace's current location.

Examples

To move the
myWorkspace
workspace to
\new\workspaceDirectory
:
cm workspace move myWorkspace \new\workspaceDirectory
To move the current workspace to
c:\users\maria\wkspaces\newlocation
:
cm workspace move c:\users\maria\wkspaces\newlocation

Move a workspace to a different volume

You can't move a workspace across volumes. Instead, create a workspace on the target volume and then delete the old one.
To move a workspace to a different volume, follow these steps:
  1. Check in or shelve any pending changes in the workspace.
  2. Use
    cm workspace create
    to create a new workspace on the target volume for the same repository:
    cm workspace create <workspace_name> <new_path> <repository_spec>
    For example:
    cm workspace create myWorkspace D:\wkspaces\myWorkspace myrep@myserver:8087
  3. Use
    cm switch
    to switch the new workspace to the branch or changeset you worked on. The command downloads the files to the new location.
    cm switch br:/main/my-feature --workspace=D:\wkspaces\myWorkspace
  4. If you shelved your changes, go to the new workspace directory and use
    cm shelveset apply
    to apply the shelve to the new workspace:
    cm shelveset apply <shelve_spec>
  5. Use
    cm workspace delete
    to delete the old workspace:
    cm workspace delete <old_path>

Additional resources