Documentation

Support

Unity Version Control

Create a branch

Create a new branch in your repository.
Read time 1 minuteLast updated 21 days ago

In Unity Version Control (UVCS), you can work in branches. You can create and switch between branches in both the Unity DevOps Version Control desktop application, and the command line.

Create a branch in the GUI

  1. On the Branch Explorer tab, right-click the changeset from which you want to create a branch. Your current changeset shows a house icon.
  2. Select Create branch from this changeset.
  3. Select whether you want to create manually or from a task:
    • If you use tasks in UVCS, you can select a task and mark it as open in your issue tracker.
    • If you want to create a branch manually, select the Manual tab and enter a branch name.
  4. Enter any comments.
  5. To start development on the branch, select Switch workspace to this branch and select Create.

Create a branch in the CLI

  1. To create a new branch, run the
    cm branch
    command:
    cm branch main/fix-1342
    If you don’t specify a changeset, the new branch branches off the latest changeset on the parent branch. To specify a changeset, use the
    --changeset
    or
    --label
    modifier.
  2. Run the
    cm switch
    command to switch your workspace to the new branch:
    <Note> cm switch main/fix-1342</Note>Performing switch operation...Searching for changed items in the workspace...Setting the new selector...Plastic is updating your workspace. Wait a moment, please...The workspace c:\Users\pablo\wkspaces\quake_path is up-to-date (cset:573@quake@localhost:6060)