Use a nodata replica

Use dehydrated nodata replicas to create low-storage, functional clones of large repositories so you don’t need to create a full local clone. Because nodata replicas only contain metadata, they are small and fast to create, even for multi-terabyte repositories.

When an operation requires file content, such as to update your workspace, UVCS retrieves the necessary data on-demand from the source repository. Unity Version Control (UVCS) uses this data for the operation, but doesn’t store it in your local replica.

When you check in new files to a nodata replica, the new data is stored locally within your replica. You can then push these changes back to the main server as with a standard replica.

For more information on partial clones and version control workflows, refer to Workflows and partial replicas.

Create a nodata replica

To create a nodata replica, you can use either the UVCS desktop application or the command-line interface (CLI): To create a nodata replica in the UVCS desktop application, do the following: 1. In the Branches view, right-click a branch. 1. Select Push/Pull > Pull this branch. 1. Select the source repository. 1. Select the Do not replicate data option.

To create a nodata replica in the CLI, use the --nodata flag with the replicate command: cm pull <source_spec> <destination_spec> --nodata

Hydrate a replica for offline use

The primary limitation of a nodata replica is that it requires a network connection to the source repository to retrieve file data. To work offline, you need to intentionally download the file data you need from the source repository. This process is known as hydrating the replica.

You can use the CLI pull command to hydrate a replica:

To download the data for an entire branch: cm pull hydrate <branch_name>@<repo_spec> To download the data for a specific changeset: cm pull hydrate --cset=<changeset_id>@<repo_spec>

Hydrate the latest changeset

A common and efficient workflow is to download only the data required for your current work, instead of the entire branch history. The process is as follows:

  1. Create a nodata replica of the main repository.
  2. Hydrate only the latest changeset of the branch you want to work on.
  3. Update your workspace to that changeset.

This workflow ensures that your workspace is fully functional for offline work. You have all the necessary data for your current task without the need to download the historical data for the entire repository.