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 to , and to .
cm workspacecm wkmovemvOptions
Option or argument | Description |
|---|---|
| Specification of the workspace to move. For more information about specs, refer to objectspec. |
| The path to move the workspace to. It must be on the same volume as the workspace's current location. |
Examples
To move the workspace to :
myWorkspace\new\workspaceDirectorycm workspace move myWorkspace \new\workspaceDirectory
To move the current workspace to :
c:\users\maria\wkspaces\newlocationcm 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:
-
Check in or shelve any pending changes in the workspace.
-
Useto create a new workspace on the target volume for the same repository:
cm workspace createcm workspace create <workspace_name> <new_path> <repository_spec>For example:cm workspace create myWorkspace D:\wkspaces\myWorkspace myrep@myserver:8087 -
Useto switch the new workspace to the branch or changeset you worked on. The command downloads the files to the new location.
cm switchcm switch br:/main/my-feature --workspace=D:\wkspaces\myWorkspace -
If you shelved your changes, go to the new workspace directory and useto apply the shelve to the new workspace:
cm shelveset applycm shelveset apply <shelve_spec> -
Useto delete the old workspace:
cm workspace deletecm workspace delete <old_path>