---
title: "Shelve and Switch"
content_type: tutorial
url: "https://learn.unity.com/tutorial/shelve-and-switch?language=en"
language: en
difficulty: advanced
duration_minutes: 30
unity_version:
  - "6.2"
  - "6.1"
  - "6.0"
  - "6.0"
  - "2022.1"
supported_unity_versions:
  - name: "6.2"
    url: "https://learn.unity.com/tutorial/shelve-and-switch.md?language=en&version=6.2"
  - name: "6.1"
    url: "https://learn.unity.com/tutorial/shelve-and-switch.md?language=en&version=6.1"
  - name: "6.0"
    url: "https://learn.unity.com/tutorial/shelve-and-switch.md?language=en&version=6.0"
  - name: "2022.1"
    url: "https://learn.unity.com/tutorial/shelve-and-switch.md?language=en&version=2022.1"
last_updated: "2026-08-04T14:21:28.000Z"
---

# Shelve and Switch

Learn to use Shelve and Shelve and Switch in Unity DevOps to move between branches without losing or committing in-progress work.

When you’re working on multiple things at the same time, it can be useful to set some work to the side, to be picked up again later.

In this tutorial, you’ll discover how to use the **Shelve** and the **Shelve and Switch** operations to help you switch easily between different branches without losing your work in progress files (which have not been committed to the Cloud repository yet).  The **Shelve** operation also has other benefits, such as allowing you to easily share uncommitted changes with your team members, save changes you recurrently apply in your workspace but don’t want to check in, and manually select which files to keep or bring with you.

**Note**: This tutorial is part of the [**Get started with Unity DevOps**](https://learn.unity.com/course/get-started-with-unity-devops) course. Explore the rest of the course to learn more about how DevOps can support your work as a creator.

## 1. Overview

Sometimes, you’ll be working in the Unity Editor making changes to a project, but you’ll need to switch to another task. Switching branches with the UVCS plugin requires you to check in your files in the **Pending** **Changes** tab first.

Instead of having to decide between checking in changes that aren’t finished yet or discarding them entirely, Unity Version Control allows you to save those changes for later.

The **Shelve** button allows you to store your unfinished changes on a shelf (with these stored changes referred to as a **shelveset**) and switch to a different branch or changeset. This is very useful because by shelving changes, you don’t lose your current work. You can come back to your shelveset later and re-apply the changes, or even keep them with you while switching to the other branch. This reduces your mental load and offers flexibility in your development journey.

In this tutorial, we’ll explore two different scenarios where you can make use of shelves:

- Keeping your changed files with you
- Leaving the changes on a temporary shelveset

These two scenarios are the most likely use cases for keeping your changed files with you that you’ll encounter when you’re faced with a sudden branch change. Each scenario has certain benefits. It’s up to you to decide which one makes the most sense for each situation.

**Note**: For this tutorial, we recommend using Unity 6.0 or a later version. The screenshots used in this course are based on version **6000.0.38f1** and the [UVCS package version 2.7.1](https://docs.unity3d.com/Packages/com.unity.collab-proxy@2.7/changelog/CHANGELOG.html). This version contains the UVCS plugin with the Shelve capability. If you don’t have Unity 6 or a later version installed, you’ll need to update your project during the setup phase, otherwise you won’t be able to follow the instructions described below.

By the end of this tutorial, you’ll be able to do the following:

- Explain the concept of shelves.
- Understand the Shelve and Shelve and Switch operations.
- Learn how to set up shelve settings for your projects in the Unity Editor.
- Understand two different scenarios when doing a Shelve and Switch operation:
  - Shelving your content and coming back to it later.
  - Keeping the changes with you.

## 2. Before you begin

## Confirm access to the Unity Dashboard

To review the Unity DevOps tools and workflows on the Unity Dashboard as you work through this tutorial, you’ll need to activate a subscription for [Unity DevOps](https://unity.com/products?c=unity+services&s=collaboration) and access your account on the [Unity Dashboard](https://dashboard.unity3d.com/devops).

**Important**: Unity DevOps is free to use and doesn't require a credit card. The paid version will only be required if you [add more than three users to or use more than 5 GB data on the DevOps account](https://unity.com/products/unity-devops/pricing).

## Sign in to Unity DevOps

Follow these instructions to sign in to your Unity Version Control Dashboard and make sure that you have an active DevOps subscription:

**1.**  In your browser, navigate to the [Unity Cloud website](https://cloud.unity.com/).

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/9d58d564-0401-4e8f-93f7-2b4ec43fa5bc_8.1.png)

**2.**  If you’re not already signed in to your Unity account, select **Sign in**.

Once you’re signed in, your Unity Dashboard will be visible.

**3.**  Once you’re signed in, make sure that you have an active DevOps account. If you don’t, select **Try now** and set up your account.

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/f2b1b750-e9b9-4ae5-9de6-9828b31d5a64_8.2.png)

Once you’re logged in to [cloud.unity.com](http://cloud.unity.com/) with your Unity credentials, you’re ready to start the tutorial.

## 3. Project setup

Before you start learning about the Shelve and Switch functionalities, you’ll need to set up your project.

**1.**  Open the Unity Hub and create a new project using the **Universal** **3D** template and enable **Unity Version Control**.

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/e29f3a49-0355-403f-8bed-a435c446061a_8.3.png)

**Note**: We’re using the **Universal** **3D** template for instructional purposes. It doesn’t matter what type of project template you use, just make sure to enable **Use Unity Version Control**.

**2.**  Add a **Plane** GameObject (right-click in the **Hierarchy** window and select **3D Object** > **Plane**) and a **Cube** GameObject (right-click in the **Hierarchy** window and select **3D Object** > **Cube**) to the scene.

**3.**  In the **Inspector** window, set the **Cube** GameObject’s **Transform** component’s **Position** property to **Y** = **0.5**.

**4.**  In the **Project** window, right-click in the **Assets** folder, select **Create** > **Material**, rename the material “CubeMaterial”, and apply it to the **Cube** GameObject.

**5.**  In the **Inspector** window, use the foldout (triangle) to expand the **Surface** **Inputs** component of the **Cube Material**. Under the **Surface** **Inputs** section, select the **Base Map** property dropper or swatch and change the color of the **Cube** **Material** so that it stands out against the **Plane** GameObject.

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/d889d541-1f81-445c-94a9-7cf4c0f1ffdd_8.4.png)

**7.**  Save the scene (**File** > **Save** or **Ctrl**+**S** (macOS: **Cmd**+**S**)).

**8.**  At the bottom of the Editor, locate the **Unity** **Version** **Control** window.

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/835bd40c-2cdc-44d9-8ebd-5abf14327e78_8.5.png)

**9.**  In the **Unity Version Control** window, enable the **Item** property, enter “Initial project setup” in the **Comment** box, and select **Check in**.

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/1b2d128b-e279-4ad6-9e81-aa16852718b0_8.6.png)

This adds all of the program files to your repository.

**10.**  In the **Unity** **Version** **Control** window, select the **Branches** tab.

**11.**  Right-click the **/main** branch, select **Create child branch** from the context menu, name the new branch “Main-Scene-Level-Design”, ensure that **Switch** **workspace** **to** **this** **branch** is enabled, and select **Create**.

![](https://connect-mediagw.unity.com/h1/20250902/learn/images/23bde083-2271-4585-b55b-31eb843760ca_8.7.png)

Your project is now set up and you’re ready to learn about Shelve and Switch!

## 4. Shelve and Switch

Shelving your changed files in your project and switching to another branch is a great way to iterate and try quick prototype branches in order to try out ideas or help your team review code, fix bugs, and other tasks that frequently happen in a solo or group project.

## Leave changes

Let’s simulate a scenario where you’re working on a scene in one branch, but you need to switch to another branch to iterate on your scene and you want to leave your uncommitted changes behind.

Normally, you’d have to decide whether you want to commit your unfinished changes to the **/main/Main-Scene-Level-Design** branch or discard them, losing all the work that you’ve done. This is where Shelve and Switch comes in!

**1.**  In the **Scene** view, select the **Cube** GameObject and move it to another part of the **Plane** GameObject.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/08481d96-4896-4b6c-a9e6-f43e455e73cf_8.8.png)

**2.**  Save the scene (**File** > **Save** or **Ctrl**+**S** (macOS: **Cmd**+**S**)).

**3.**  In the **Unity Version Control** window, select the **Pending Changes** tab.

You’ll see your changes have been saved, but haven’t been committed to the **/main/Main-Scene-Level-Design** branch.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/a688790d-bdfa-4c87-b453-78f1360845dc_8.9.png)

**4.**  In the **Unity Version Control** window, select the **Branches** tab.

**5.**  Right-click the **/main** branch and select **Switch workspace to this branch** from the context menu.

The first time you go through this process, a dialog will appear asking you if you want to enable the new Shelve and Switch experience. Select **Yes, enable it!** to proceed.

Unity Version Control will try to switch your workspace to this new branch, but will detect that you have local files that have been changed but not committed to the **/main/Main-Scene-Level-Design** branch.

A dialog will appear asking you what you want to do with these files before switching to the new branch: **Leave changes on Main-Scene-Level-Design** or **Bring changes to main**.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/bf978cc0-9268-4b43-94fd-7acaadd9baf3_8.11.png)

**6.**  Enable **Leave changes on Main-Scene-Level-Design** and select **Switch**.

A dialog will appear notifying you that the open scene(s) have been modified externally.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/260fd859-659a-407f-aaa0-42ce7e996e86_8.12.png)

**7.**  Select **Reload**.

Once you’ve switched to the **/main** branch and reloaded the scene, you’ll notice that the cube is in its original position.

This is because you didn’t commit your changed files (the scene where you moved the cube) to the **/Main-Scene-Level-Design** branch before switching to the **/main** branch.

This is clearly indicated in the **Pending Changes** tab of the **/main** branch: there are no changes to check in.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/e13b1f17-98c7-4390-af60-31a83a84f2ea_Screenshot_2025-09-03_at_2.26.59_PM.png)

You can now make changes on this branch without interfering with the /**main/Main-Scene-Level-Design** branch.

Now let’s say that you want to go back to the **/main/Main-Scene-Level-Design** branch to keep working on your uncommitted changes (the cube you moved).

**8.**  In the **Unity Version Control** window, select the **Branches** tab, right-click the **/main/Main-Scene-Level-Design** branch, and select **Switch workspace to this branch** from the context menu.

You’ll see that the cube is still in its original spot, not where you moved it to! But where did the scene with the moved cube go?

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/4c182902-fa94-4ac5-9514-787a1e144580_8.14.png)

Don’t worry, you didn’t lose all your hard work. Unity Version Control has saved your uncommitted changes in a shelveset for you to recover whenever you want.

A **shelveset** allows you to temporarily store pending changes in your workspace without committing them to a branch.

Let’s retrieve your previous Unity scene, where the cube was moved.

**9.**  In the lower-left corner of the **Unity Version Control** window, locate the **Shelved changes** notification and select the **View** button.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/470b7131-ec64-437e-8bc1-c986f7941ee9_8.15.png)

This opens the **Merge** tab and displays the details of your shelveset: the name of the shelved file, its size, its author, and when it was modified. There is also a comment section. This helps you get additional context, when the Shelve and Switch operation is done.

From here you can decide whether you want to apply the uncommitted changes to the scene or discard them.

**10.**  Select **Apply changes** to recover your scene and add the shelveset in your current branch, and when prompted, select **Reload**.

The cube is now back where you left it, ready for you to begin working again without having to restart entirely!

Bring changes

## Now let’s go through the other scenario: bringing changes when you switch branches.

This option can be helpful if you accidentally make changes on a branch you didn't mean to and want to bring the changes to the correct branch.

**1.**  In the **Branches** tab, right-click the **/main** branch and select **Switch** **workspace** **to** **this** **branch** from the context menu.

**2.**  Enable **Bring changes to main** and select **Switch**.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/e34240c2-a3d9-4aa3-ba06-f0c238f8dc5a_8.19.png)

Now in the **/main** branch, the cube is in the position you moved it to on the **/main/Main-Scene-Level-Design** branch!

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/3123cb6e-9e98-44eb-96db-550a6267a387_8.20.png)

**3.**  In the **Unity Version Control** window, enable the **Item** property, enter “Moved cube” in the **Comment** box, and select **Check in**.

![](https://connect-mediagw.unity.com/h1/20250903/learn/images/00c6d069-6d35-4ed4-a6ff-cc12400099db_8.21.png)

Congratulations, you’ve successfully completed your first Shelve and Switch operation.

This automatic solution helps you switch branches and keep your work in progress somewhere safe.

You learned how to use it in two scenarios:


- Leaving your changes on a shelveset
- Bringing your changes to a different branch



Now you can start using **Shelve and Switch** for your own project inside the Unity Editor.

In the next section, you’ll learn how to manually shelve your files.

This is an optional section, so feel free to stop here. But note that a manual shelve operation is useful for more advanced scenarios. So if you want to dig into this topic a bit more, continue reading to learn about the **Shelve** operation.

## 5. Shelve

Now let’s explore another scenario. Let’s say that you’ve made a change to your scene in the **/main** branch, but you want to set it aside to work on it later while you continue to work in the **/main** branch.

**1.**  In the **/main** branch, set the **Cube** GameObject’s **Transform** component’s **Position** property to **Y** = **1** and the **Scale** property to **X** = **2**, **Y** = **2**, and **Z** = **2,** then save the scene by pressing **Ctrl**+**S** (macOS: **Cmd**+**S**).

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/ba5254d5-b40c-4ea3-8a8f-7bc7c965537b_8.22.png)

**2.**  Select the **Pending Changes** tab of the **Unity** **Version** **Control** window.

Here you can see the change that you’ve made (making the cube larger) that hasn’t been committed to the **/main** branch.

![](https://unity-connect-prd.storage.googleapis.com/20250912/learn/images/11ed328d-e948-4a31-b4bc-9921563c51cf_8.23.png)

For this example, let’s imagine that once you’ve made and saved this change, you realise that you’re not working on the right branch; not only that, you’ve forgotten to create the branch that you should be working on. Instead of having to undo your changes while you create the new branch, you can shelve them and store them for use later.

**3.**  Enter “Larger cube” in the **Comment** box and select the **Shelve** button.

![](https://unity-connect-prd.storage.googleapis.com/20250912/learn/images/1daeb3a8-4e30-432c-80c2-dcaa55e60728_8.24.png)

The **Undo changes after shelve** dialog will then appear.

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/aba59b1b-14fe-4ac0-8c66-fcf19f898c1e_8.25.png)

At this point, you have the choice between undoing your current changes or keeping them in your workspace, after the shelveset gets created. Alternatively you can close the dialog to cancel the operation altogether and the shelveset will not be created.

**4.**  Select the **Keep changes** button, and when prompted, select **Reload**.

Undoing the changes means that the changes that you made in the **/main** branch, where you shouldn’t be working, will be removed from that branch.

The shelveset is now created, and you can see the confirmation message “The changes are shelved under Shelve X”.

**Note**: “X” being the number of shelves you have in your project. It could be different than the number in the screenshot).

![](https://unity-connect-prd.storage.googleapis.com/20250912/learn/images/7b4678dc-b6ec-4207-991f-840a256095c7_8.26.png)

Now you need to create your new branch to continue working on this new feature.

**5.** Open the **Branches** tab, right-click the **/main** branch, select **Create child branch**, name the new branch “My-New-Feature”, ensure **Switch workspace to this branch** is enabled, and select **Create.**

![](https://unity-connect-prd.storage.googleapis.com/20250912/learn/images/e5760b76-8443-454c-af6a-f2cd4fa27f90_Screenshot_2025-09-11_at_11.45.06_AM.png)

The cube will now be in its moved position, but back at its original size.

Now let’s say that you want to start working on your enlarged cube shelveset again.

**6.** Select the **Show shelves** icon.

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/b07c66bb-7109-472a-8b0f-e0993e645b9f_image1.png)

This opens the **Shelves** tab.

In the **Shelves** tab, you can see all the shelvesets that exist in your project’s repository.

**Note**: By default, you only see your own shelves, but if you’re working with others in the same project, you can see their shelves by opening the **My** **Shelves** dropdown and selecting **All** **Shelves**.

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/eb412cde-c4a8-4e98-82f0-68915bfa878b_image5.png)

In order to apply the stored shelveset in your current workspace, you need to merge it.

**7.**  In the **Shelves** tab, right-click the shelveset with the “Larger cube” comment, then select **Apply** **shelve** **in** **my** **workspace** from the context menu.

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/c4b49492-e6d7-4b8d-b648-0c8b2ed87fe5_image17.png)

Doing this opens the **Merge** tab, which lists the changes that are going to be applied. In order to apply the stored shelveset in your workspace, you’ll need to merge it.

**8.**  In the **Merge** tab, select **Apply** **changes** to apply the shelveset to your workspace, and when prompted, select **Reload**.

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/080d2a10-e078-4345-92b9-3bcc2090180c_8.33.png)

The enlarged cube is back, and you can pick up where you left off!

![](https://unity-connect-prd.storage.googleapis.com/20250903/learn/images/9b592eb1-cfaf-469c-9373-6595f59b9f82_8.34.png)

If you select the **Pending** **changes** tab, you’ll see the changes waiting to be checked in.


This section has shown you how to manually apply a shelveset, contrary to section 8.4, which offers a more automated flow, and also how to browse Shelves made by the rest of your team, if you’re working with multiple people in the same project.

This flow is useful when you’re working as part of a team on a feature that you’re not quite ready to commit and still need feedback on. You can create a shelveset with your change, then have your colleagues apply that shelveset to branches of their own so they can see it for themselves and provide you with feedback.

Feel free to start using it in your own Unity projects and more easily switch between branches, without fear of losing any precious work done so far!

## 6. Next steps

Now that you’ve learned how to Shelve and Switch branches without losing any work, you can check out the other tutorials in the [**Get started with Unity DevOps**](https://learn.unity.com/course/get-started-with-unity-devops?uv=2022.1) course.
