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

# branch

> Manage branches in the current repo

The branch command allows you to manipulate branches: creating, deleting, and renaming.

## Create a branch

To create a new branch, run:

```bash theme={null}
dv branch -c <branch-name> [-no-checkout]
```

A new branch `branch-name` will be created. If the flag `-no-checkout` is *not*  passed, the new branch will be
checked out.

The branch\_name has to be a unique identifier, not named after any other existing branch.

Uncommitted changes will be transferred to the newly created branch.

## Delete a branch

To delete a branch, run:

```bash theme={null}
dv branch -d <branch-name>
```

For convenient autocompletion of the branch name, run the CLI in interactive mode.

This command deletes the branch with the given id as parameter, the ID in this case is the branch’s name.

The `–f` flag is optional and suppresses the confirmation dialog for deleting the branch.

## Rename a branch

```bash theme={null}
dv branch -r <branch_id> <new_name> 
```

The new name parameter has to be a unique identifier, not previously used for any other branch.
