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

# diff

> Compare changes between branches or commits with Diversion's diff command for clear version insights.

The `diff` command allows you to compare changes between your current workspace, branches, commits, or tags.

```bash theme={null}
dv diff [paths...] [--base <ref>] [--compare <ref>] [--name-status] [--color <auto|always|never>]
```

`[paths...]` is a file or directory to compare. If omitted, Diversion compares the entire repository.

`[--base <ref>]` sets the base reference to compare from (branch name, commit ID, or tag). Defaults to the workspace's base commit.

`[--compare <ref>]` sets the reference to compare to (branch name, commit ID, or tag). Defaults to the current workspace.

`[--name-status]` shows only names and status of changed files (A=added, M=modified, D=deleted, R=renamed).

`[--color <auto|always|never>]` controls color output. Defaults to `auto`.

For example, to see what changed between two branches:

```bash theme={null}
dv diff --base main --compare feature-branch
```

To see just a summary of changed files:

```bash theme={null}
dv diff --name-status
```
