文档

​
​

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
        • workspace create
        • workspace delete
        • workspace list
        • workspace move
        • workspace rename
      • workspacestatus
      • xlink
    • CLI help
    • Pipe commands
    • cm find
    • Windows keyboard shortcuts
  • Release Notes
  1. Unity Version Control (previously Plastic SCM)

WORKSPACE CREATE

Create workspaces with the Unity Version Control CLI.
阅读时间2 分钟
最后更新于 10 个月前

Description

Creates a new workspace.

Usage

cm workspace | wk [create | mk] <rep_spec> [create | mk] <wk_name> <wk_path> [<rep_spec>] [create | mk] <wk_name> <wk_path> [--selector[=<selector_file>]
(Creates a new workspace.)
cm workspace | wk [create | mk] <wk_name> <wk_path> --dynamic --tree=[<tree>]
(Creates a dynamic workspace. This feature is still experimental, and it's only available for Windows.)

Options

Option / Argument

Description

--selectorEdits a selector for the new workspace. If a selector file is specified, then sets the selector for the new workspace from the specified file.
--dynamicCreates a dynamic workspace. This feature is still experimental, and it's only available for Windows. Specifying this flag requires using the --tree parameter.
--treeUsed with the '--dynamic' flag, specifies the initial point the dynamic workspace is going to load. It can either be a branch, changeset, or label specification. The workspace will later on use the repository in the spec. (Use 'cm help objectspec' to learn more about specs.)
wk_nameThe new workspace name.
wk_pathPath of the new workspace.
rep_specCreates the new workspace with the specified repository. Repository specification: check 'cm help objectspec'.

Help

Remarks

  • A workspace is a view of the repository mapped to the local filesystem. The workspace selector defines the rules that specify workspace content. Use 'cm showselector' to display a workspace selector or 'cm setselector' to modify it.
  • If neither rep_spec nor '--selector' is specified, then the workspace will automatically be configured to use the first repository (alphabetically) of the server configured in the client.conf file.
  • The dynamic workspaces is a experimental feature (Windows only), and it requires the plasticfs.exe program running.

Examples

cm workspace create mycode
cm wk mk mycode
(Creates a 'mycode' workspace pointing to the repository with the same name. The workspace directory will be created under the current directory.)
cm wk mk mycode@localhost:8084
cm wk mk mycode@myorganization@cloud
(Creates a 'mycode' workspace as before, but you can specify different repository server.)
cm workspace create myworkspace c:\workspace
cm wk mk myworkspace /home/john/plastic_view
(Creates 'myworkspace' workspace in Windows and in Linux respectively.)
cm wk mywktest c:\wks\wktest --selector=myselector.txt
(Creates 'mywktest' workspace using the selector in 'myselector.txt' file.)
cm wk mywkprj c:\wks\wkprj myrep@repserver:localhost:8084
(Creates 'mywkprj' workspace with the selected repository.)
cm wk mywkprj c:\dynwks\mywkprj --dynamic --tree=br:/main@myrep@localhost:8084
(Creates dynamic 'mywkprj' workspace with the 'myrep@localhost:8084' repository, pointing to 'br:/main' the first time it gets mounted.)

Copyright © 2026 Unity Technologies
法律信息隐私政策CookiesDocumentation Terms of Use请勿出售或分享我的个人信息您的隐私选择(Cookie 设置)

“Unity”、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属公司在美国和其他地方的商标或注册商标(此处查看更多信息)。其他名称或品牌是其各自所有者的商标。

为方便起见,一些页面是机器翻译的,可能包含不准确的内容。如有信息不一致的情况,以英文版本为准。

  • 在本页上
    • Description

      • Usage

      • Options

    • Help

      • Remarks

      • Examples


报告此页面的问题