> ## 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.

# restore

> Restore a file or directory from a commit, branch, or tag

The `restore` command restores a file or directory from a previous commit, branch, or tag into your current workspace.

```bash theme={null}
dv restore <path> [--source <ref>]
```

`<path>` is the file or directory path to restore.

`[--source <ref>]` specifies the source to restore from: a commit ID, branch name, or tag ID. Defaults to the workspace's base commit.

For example, to restore a file from the current base commit:

```bash theme={null}
dv restore path/to/file.uasset
```

To restore from a specific branch:

```bash theme={null}
dv restore path/to/file.uasset --source main
```
