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

# tag

> Create, list, or delete tags in Diversion using the tag command for efficient version tracking.

In Diversion, you can tag commits for easier reference of particular commits.

```bash theme={null}
dv tag [-sub-command] [--json]
```

To create a new tag:

```bash theme={null}
dv tag -c <name> [-a <description>] [--ref <commit_id>]
```

The above command will create a new tag with the name `<name>`, and optionally, you can add a description `[-a “Tag description”]`.

You can also provide the `commit_id` explicitly, or by default, the current commit will be tagged.

To delete a tag:

```bash theme={null}
dv tag -d <tag_id> [-f]
```

The tag ID must be Diversion's ID, not the tag name.

To modify an existing tag:

```bash theme={null}
dv tag -m <tag_id> [--name <new_name>] [-a <description>]
```

`[--name <new_name>]` changes the tag's name.

`[-a <description>]` updates the tag's description.
