# Orphan a Branch with Aviator CLI

Aviator CLI keeps track of all the branches you have created through the CLI or that you have adopted in a db file in `.git/av/av.db`. If for some reason you want to remove a stack from the CLI, you can run

```
git switch <branch>
```

and then run

```
av orphan
```

The current branch, and all branches following it in the stack, will be removed from `av.db` and will no longer be tracked by the CLI. To re-add them take a look at [Adopt a Branch](/aviator-cli/how-to-guides/adopt-a-branch.md).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aviator.co/aviator-cli/how-to-guides/orphan-a-branch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
