Documentation

Unity command-line interface (CLI)

Download Unity Hub

Unity command-line interface (CLI)

Version control commands for the Unity CLI

Manage version control for Unity projects with Git, Git providers, and Unity Version Control (UVCS), including commands for asset integrity checks, scene and prefab merges, resolving conflicts, and change analysis.
Read time 2 minutesLast updated 2 days ago

Use the
unity vcs
commands to manage version control for Unity projects from the Unity CLI. Check repository health, track changes, compare scenes and prefabs, resolve merge conflicts, and analyze how changes affect assets, assemblies, and tests. The commands work with Unity Version Control (UVCS) and Git repositories, including GitHub, GitLab, and self-hosted Git with Git LFS. These commands are separate from Unity Collaboration.

Command

Description

vcs setup
Sets up a project from no version control to its first commit on a remote. Asks only what it can't detect, and prints the equivalent flag command.
vcs status
Shows changes grouped by their meaning to Unity, including
.meta
file pairing problems.
vcs sync
Pulls safely: refuse while an Editor holds the project, fetch commits and LFS objects, then report the reimport.
vcs switch
Switches branches safely and report the impact before you switch.
vcs doctor
Checks the repository settings, ignore rules, and LFS configuration a Unity project needs.
--fix
repairs what it can.
vcs merge-setup
Configures Unity scene and prefab merging (UnityYAMLMerge) for the repository.
vcs conflicts
Lists unresolved merge conflicts, classified by whether they can merge automatically.
vcs explain
Explains in plain language what each side of a conflict changed.
vcs resolve
Resolves a conflicted Unity asset using the Editor's own merge tool.
vcs diff
Compares a scene or prefab by GameObject and component name rather than by
fileID
.
vcs blame
Shows who last changed each GameObject and component in a scene or prefab.
vcs summarize
Summarizes branch changes so you can paste them into a pull request.
vcs affected
Reports which assets, assemblies, and tests a change affects. Reports a lower bound when applicable.
vcs hooks
Installs or removes Git hooks that run Unity integrity checks on your commits.
vcs providers
Reports which Git providers this machine can reach, as whom, and what each host allows.
vcs git
Git-only verbs, including
git worktree
and
git migrate-lfs
.
vcs uvcs
Unity Version Control reads, including
uvcs locks
,
uvcs changesets
, and
uvcs review
.