> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diversion.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Workspace management

> Create, rename, delete, and clone workspaces

Every collaborator on a repository gets their own workspace -- a private space where you can make changes without affecting anyone else. Workspaces keep your uncommitted work separate and synced to the cloud automatically.

If you're not familiar with the concept, check out the [Repositories, Branches, and Workspaces](/concepts/repo-branch-workspace) page first.

<Warning>We recommend using a separate workspace for each machine. Cloning the same workspace on multiple machines may lead to sync issues and data loss.</Warning>

## Cloned vs. non-cloned workspaces

A workspace can be either **cloned** (local) or **non-cloned** (cloud-only). Understanding the difference helps you decide how to set up your workflow.

|                               | Cloned (local)                                                                                              | Non-cloned (cloud-only)                                    |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| **Where files live**          | On your machine, synced with the cloud                                                                      | Only on the Diversion cloud                                |
| **How to edit files**         | Use any local editor, IDE, or game engine                                                                   | Upload files through the web or desktop app                |
| **Auto-sync**                 | Changes sync bidirectionally -- local edits upload automatically, and remote changes download automatically | No local sync needed -- everything is already in the cloud |
| **Show in Explorer / Finder** | Available -- opens the file's location on disk                                                              | Not available                                              |
| **Open with default app**     | Available -- opens the file with your OS's associated application                                           | Not available                                              |
| **Disk usage**                | Uses local disk space for the full working copy                                                             | No local disk space used                                   |

**When to use a cloned workspace:** Most of the time. If you're actively developing -- writing code, editing assets in a game engine, or using any local tools -- you need a cloned workspace so those tools can access the files on disk.

**When to use a non-cloned workspace:** When you only need to browse files, review changes, or manage branches without editing locally. This is useful for lightweight access from a machine where you don't want to download the full project, or for managing multiple workspaces without duplicating large repositories on disk.

You can clone a non-cloned workspace at any time -- see [Cloning a workspace locally](#cloning-a-workspace-locally-desktop-only) below.

## Creating a new workspace

In the Desktop App:

<Steps>
  <Step title="Open the workspace selector">
    Open the workspace selector at the top-right of the repo view.

    <img src="https://mintcdn.com/diversion-2/UZ43CqMpCXHHcPfk/images/workspace-mgmt-new-workspace-button.png?fit=max&auto=format&n=UZ43CqMpCXHHcPfk&q=85&s=45452efe3fdff1ad060ad9693319ec07" alt="The new workspace button in the workspace selector" width="425" height="135" data-path="images/workspace-mgmt-new-workspace-button.png" />
  </Step>

  <Step title="Click '+ New workspace'">
    This opens the **Create New Workspace** dialog.

    <img src="https://mintcdn.com/diversion-2/8hwWqMhzYssWzT-3/images/workspace-mgmt-new-workspace-dialog.png?fit=max&auto=format&n=8hwWqMhzYssWzT-3&q=85&s=d5fb923b016c0a777671be39003b48b8" alt="The create new workspace dialog" width="832" height="321" data-path="images/workspace-mgmt-new-workspace-dialog.png" />
  </Step>

  <Step title="Enter a workspace name">
    Give your workspace a descriptive name. This is required.

    In the desktop app, you can also check the **Clone this workspace locally** option to immediately create a local copy. If you choose to clone, you'll need to pick a folder name and a directory on your machine.
  </Step>

  <Step title="Click 'Create' or 'Create & clone'">
    The workspace is created from the repository's default branch. Once it's ready, you'll be navigated to the new workspace automatically.
  </Step>
</Steps>

For CLI usage, see [clone command](/cmd-ref/clone).

## Working from multiple computers

You can work on the same project from several machines -- a desktop and a laptop, for example. Set up a separate workspace on each machine rather than sharing one.

Your machines stay in sync through commits. **Uncommitted local changes stay on the machine where they were saved** -- they are not uploaded to the cloud or visible from any other computer until you commit them. Once committed, every workspace tracking that branch picks them up automatically. To move *uncommitted* work between machines without committing, use [Shelves](/basic/shelves), which are stored in the cloud and available from any workspace on the same repository.

<Warning>
  Don't share a single workspace between machines via a cloud-synced folder (Dropbox, OneDrive, iCloud, Google Drive), a network drive, or by copying the `.diversion` directory. Each machine's agent will fight over the workspace's state, which can cause files to be deleted, sync loops, or repeated `dv reset` recoveries.
</Warning>

### Set up a second machine

<Steps>
  <Step title="Install Diversion on the second machine">
    Sign in with the same account you use on your primary machine.
  </Step>

  <Step title="Create a new workspace on that machine">
    Follow the [Creating a new workspace](#creating-a-new-workspace) steps and clone it locally. Give it a name that identifies the machine (e.g., `main-laptop`) so you can tell your workspaces apart.
  </Step>

  <Step title="Start working">
    Your new workspace syncs automatically. See [Moving work between your machines](#moving-work-between-your-machines) below for how changes travel from one machine to the other.
  </Step>
</Steps>

### Moving work between your machines

Work travels between your machines through commits:

* **Commit on the machine you're working on.** Only committed changes upload to the cloud, and only while sync is active -- so commit your work (`dv commit -a -m "message"` or the desktop app) and make sure sync isn't paused.
* **Find the changes on the branch they were committed to.** Each commit lands on a branch, and a workspace shows only the commits on the branch it's currently on. To see changes you made on another machine, open the **branch selector** in the desktop app (or run `dv checkout <branch>`) and switch to the branch they were committed to.
* **Let the workspace update.** With [auto-update](/concepts/syncing#workspace-automatic-update) on, the workspace pulls new commits automatically -- just like a teammate's workspace would. With it off, the sync status shows **Updates available** -- click it, or run `dv update`.
* **Selective Sync decides what lands on disk.** A folder left unchecked under **Settings -> Selective Sync** won't download locally even when its files are committed. See [Selective Sync](/advanced/selective-sync).

## Workspaces on external storage

You can keep a cloned workspace on a USB drive, external SSD, or other detachable drive that mounts as a regular local disk. This lets you carry a workspace between machines without re-cloning, as long as each machine has Diversion installed and you're signed in with the same account.

<Steps>
  <Step title="Clone the workspace to the external drive">
    When cloning, pick a folder on the external drive as the local location.
  </Step>

  <Step title="Use it like any other workspace">
    With the drive connected and the Diversion agent running, the workspace syncs normally.
  </Step>

  <Step title="Re-attach after reconnecting the drive">
    If the workspace doesn't appear after you plug the drive back in -- or after you connect it to a different machine -- use [Attach workspace](#attaching-a-workspace-desktop-only) to point Diversion at the workspace folder on the drive.
  </Step>
</Steps>

## Renaming a workspace

<Steps>
  <Step title="Open the Workspaces page">
    Click your avatar and select **Your organizations**, then click **Repositories** in the left sidebar and **Workspaces** in the repository column. Make sure the correct repository is selected in the picker at the top of the column. Find the workspace, click the actions menu at the end of its row, and select **Rename**.

    <img src="https://mintcdn.com/diversion-2/UZ43CqMpCXHHcPfk/images/workspace-mgmt-rename-menu.png?fit=max&auto=format&n=UZ43CqMpCXHHcPfk&q=85&s=6ff6aa59d0d1adf75597a5a16bcb0d4a" alt="Workspace row actions menu with Rename option" width="1029" height="245" data-path="images/workspace-mgmt-rename-menu.png" />
  </Step>

  <Step title="Enter a new name">
    The **Rename Workspace** dialog shows the current name pre-filled. Type in the new name you'd like.

    <img src="https://mintcdn.com/diversion-2/8hwWqMhzYssWzT-3/images/workspace-mgmt-rename-dialog.png?fit=max&auto=format&n=8hwWqMhzYssWzT-3&q=85&s=af66c58fe26ae6bafaaa0635b8c01a30" alt="The rename workspace dialog" width="637" height="335" data-path="images/workspace-mgmt-rename-dialog.png" />
  </Step>

  <Step title="Click 'Rename'">
    The button is disabled if the name is empty or unchanged, so make sure you've actually typed something different.
  </Step>
</Steps>

<Tip>
  You can also rename a workspace from the workspace selector on the repo view: open the selector, click the **...** (more options) menu next to the workspace, and select **Rename**.
</Tip>

For CLI usage, see [workspace command](/cmd-ref/workspace).

## Deleting a workspace

<Steps>
  <Step title="Open the Workspaces page">
    Click your avatar and select **Your organizations**, then click **Repositories** in the left sidebar and **Workspaces** in the repository column. Make sure the correct repository is selected in the picker at the top of the column. Find the workspace, click the actions menu at the end of its row, and select **Delete**.

    <img src="https://mintcdn.com/diversion-2/UZ43CqMpCXHHcPfk/images/workspace-mgmt-delete-menu.png?fit=max&auto=format&n=UZ43CqMpCXHHcPfk&q=85&s=02960c706fe73b547e187a58e2414e28" alt="Workspace row actions menu with Delete option" width="1029" height="245" data-path="images/workspace-mgmt-delete-menu.png" />
  </Step>

  <Step title="Confirm deletion">
    The **Delete Workspace** dialog asks you to confirm. Keep in mind that all uncommitted changes in the workspace will be lost.
    If the workspace is cloned locally, you'll see an additional warning that your local files will remain on disk but will no longer sync with Diversion. You'll need to check a confirmation checkbox before proceeding.

    <img src="https://mintcdn.com/diversion-2/8hwWqMhzYssWzT-3/images/workspace-mgmt-delete-dialog.png?fit=max&auto=format&n=8hwWqMhzYssWzT-3&q=85&s=8b23f03da7d974c160da2e3ca9d4a529" alt="The delete workspace confirmation dialog" width="650" height="436" data-path="images/workspace-mgmt-delete-dialog.png" />
  </Step>

  <Step title="Click 'Delete'">
    This action is permanent -- the workspace and any uncommitted changes are gone for good.
  </Step>
</Steps>

<Tip>
  You can also delete a workspace from the workspace selector on the repo view: open the selector, click the **...** (more options) menu next to the workspace, and select **Delete**.
</Tip>

For CLI usage, see [workspace command](/cmd-ref/workspace).

## Cloning a workspace locally (Desktop only)

If you have a workspace that isn't cloned to your machine yet, you can set up a local synced copy at any time.

<Steps>
  <Step title="Open the workspace selector">
    Open the workspace selector at the top-right of the repo view. Workspaces that aren't cloned on this machine appear under **Remote**. Select the one you want to clone locally.

    <img src="https://mintcdn.com/diversion-2/byT8FECKa2zLvaOH/images/workspace-mgmt-clone-menu.png?fit=max&auto=format&n=byT8FECKa2zLvaOH&q=85&s=0807540ada5368c5f024e604b8bc98d7" alt="Workspace selector with local and remote workspaces" width="930" height="648" data-path="images/workspace-mgmt-clone-menu.png" />
  </Step>

  <Step title="Pick a directory">
    A directory picker opens -- choose where you want the local copy to live on your machine.
  </Step>

  <Step title="Wait for sync">
    Diversion creates a local copy and keeps it synced automatically. Any changes you make locally will be reflected in the cloud workspace, and vice versa.
  </Step>
</Steps>

For CLI usage, see [clone command](/cmd-ref/clone).

## Attaching a workspace (Desktop only)

If you moved a repository to a different path on your machine, or if a workspace is not showing up after detaching a portable drive, you can re-attach it to Diversion.

<Steps>
  <Step title="Click the 'Attach workspace' button">
    On the dashboard, click the **Attach workspace** button in the toolbar.

    <img src="https://mintcdn.com/diversion-2/g_jyumy-qEjJFz_7/images/workspace-mgmt-attach-workspace-button.png?fit=max&auto=format&n=g_jyumy-qEjJFz_7&q=85&s=4424ce41d40bb3d047ecb8b629caf181" alt="Attach workspace button on the dashboard" width="1656" height="122" data-path="images/workspace-mgmt-attach-workspace-button.png" />
  </Step>

  <Step title="Browse to the workspace folder">
    A directory picker opens. Navigate to the folder containing your workspace (the folder with a `.diversion` directory inside it).
  </Step>

  <Step title="Click 'Connect'">
    Diversion will look up the workspace on the server and reconnect it. You'll see a confirmation message once the workspace is successfully re-attached.
  </Step>
</Steps>

<Note>The workspace folder contains a hidden `.diversion` directory that Diversion uses to track workspace state. This folder must remain in place and should not be modified or deleted. To verify it exists, enable hidden files in your file explorer (on Windows: View > Show > Hidden items; on macOS: press Cmd+Shift+.). If it is missing, or if the workspace was deleted from the server or you don't have permission to access it, you'll see an error message.</Note>

## Change the folder name without re-cloning

You can change the folder name without re-cloning by following these steps:

This is the workspace we will use for the example:

<img alt="Diversion Dashboard" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/g_jyumy-qEjJFz_7/images/diversion-dashboard.png?fit=max&auto=format&n=g_jyumy-qEjJFz_7&q=85&s=3b12b177054c17dab743d70b9e25aa8c" width="2880" height="1800" data-path="images/diversion-dashboard.png" />

<Steps>
  <Step title="Turn off the agent:">
    Right-click the Diversion icon in your system tray and select *Quit*, or end the dv.exe task in the Task Manager.

    Option a:

    <img alt="System Tray Quit" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/vVYvJimUmJw6ddmq/images/diversion-system-tray.png?fit=max&auto=format&n=vVYvJimUmJw6ddmq&q=85&s=20d532480921b740deeb0dc86f185a69" width="341" height="282" data-path="images/diversion-system-tray.png" />

    Option b:

    <img alt="Diversion End Task" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/vVYvJimUmJw6ddmq/images/dv-end-task.png?fit=max&auto=format&n=vVYvJimUmJw6ddmq&q=85&s=a659a4014345603e4e008493b67d0a26" width="1137" height="862" data-path="images/dv-end-task.png" />
  </Step>

  <Step title="Rename the folder:">
    Change the folder name directly in your file explorer.

    <img alt="Rename Local Folder" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/Uj3Y1xvBAWWLWIvr/images/rename-folder.png?fit=max&auto=format&n=Uj3Y1xvBAWWLWIvr&q=85&s=e4e51c3524fc0c94cf27ebbd3ba1f852" width="383" height="61" data-path="images/rename-folder.png" />
  </Step>

  <Step title="Restart the agent:">
    Run the command dv in your command line and verify it starts successfully. Alternatively, open the desktop app and click "start agent" when prompted.

    Option a:

    <img alt="DV Command Prompt" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/vVYvJimUmJw6ddmq/images/dv-command-prompt.png?fit=max&auto=format&n=vVYvJimUmJw6ddmq&q=85&s=8b4b7369ee09c1532e35b22c108f44ff" width="1092" height="641" data-path="images/dv-command-prompt.png" />

    Verify:

    <img alt="DV CLI" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/vVYvJimUmJw6ddmq/images/dv-cli.png?fit=max&auto=format&n=vVYvJimUmJw6ddmq&q=85&s=8ca76bc38b6fc78a8efa9e36177a4ffd" width="1092" height="635" data-path="images/dv-cli.png" />

    Option b:

    <img alt="Start Agent Noti" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/8hwWqMhzYssWzT-3/images/start-agent-notification.png?fit=max&auto=format&n=8hwWqMhzYssWzT-3&q=85&s=59140699b88a4105a5f10b22d2c6f1cb" width="1268" height="123" data-path="images/start-agent-notification.png" />
  </Step>

  <Step title="Reattach your workspace:">
    Since the folder was renamed, the workspace will not be displayed. Click *Attach workspace*.

    <img alt="Attach workspace" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/g_jyumy-qEjJFz_7/images/attach-workspace.png?fit=max&auto=format&n=g_jyumy-qEjJFz_7&q=85&s=4eb91bad281d7b4355520fe188e06a3c" width="1656" height="122" data-path="images/attach-workspace.png" />
  </Step>

  <Step title="Connect to the new path:">
    Navigate to the path with the new folder name and click *Connect*.

    <img alt="Connect Workspace" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/vVYvJimUmJw6ddmq/images/connect-workspace.png?fit=max&auto=format&n=vVYvJimUmJw6ddmq&q=85&s=d45d7904d4a5603d78f7ce0b22efa824" width="887" height="622" data-path="images/connect-workspace.png" />
  </Step>
</Steps>

You should now be able to see your workspace:

<img alt="Change Folder Finished" style={{width: '90%', borderRadius: '1.5rem', border: '.3rem solid #555', boxShadow: '0 0 1rem #888' }} src="https://mintcdn.com/diversion-2/Ro_2EfA8JfapE5By/images/change-folder-finish.png?fit=max&auto=format&n=Ro_2EfA8JfapE5By&q=85&s=089d76627f33989b318e85a9c953db3b" width="554" height="278" data-path="images/change-folder-finish.png" />
