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

# Work with branches

> Give a job an isolated writable fork of shared data.

A branch starts with the files from a volume or another branch, then keeps its
own changes. This guide uses the `demo` volume from the [Quickstart](/quickstart).

<Steps>
  <Step title="Create and mount a branch">
    Mount a missing branch to create it from the volume's current state:

    ```bash theme={null}
    amulet mount demo@experiment ./experiment
    ```

    Keep the command running.
  </Step>

  <Step title="Write isolated changes">
    From another terminal:

    ```bash theme={null}
    echo "branch only" > ./experiment/branch.txt
    cat ./experiment/branch.txt
    ```

    The file belongs to `demo@experiment`; it is not written to the volume head.
  </Step>

  <Step title="List branches">
    ```bash theme={null}
    amulet branches demo
    ```

    The output should include `experiment`.
  </Step>

  <Step title="Unmount the branch">
    ```bash theme={null}
    amulet unmount ./experiment
    ```
  </Step>
</Steps>

## Fork from another branch

Create `review` from the current state of `experiment`:

```bash theme={null}
amulet mount demo@review ./review --from experiment
```

The source option is used only when the target branch is first created. If the
target already exists with different source information, Amulet returns an
error instead of silently changing its history.

## Delete a branch

Unmount it first, then run:

```bash theme={null}
amulet delete demo@review
```

Deleting a branch does not delete the volume or sibling branches.

To start from an immutable version instead, follow
[Restore from a snapshot](/snapshots#create-a-writable-branch-from-the-snapshot).
