> For the complete documentation index, see [llms.txt](https://docs.aviator.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aviator.co/aviator-cli/faqs-and-troubleshooting/updating-default-branch-from-master-to-main.md).

# Default Branch Update Master to Main

If you choose to switch over the default branch, for instance from master to main, a few steps must be taken to update Stacked PRs CLI to handle this change:

### 1. Ensure that local remote HEAD is updated

You can do this with `git remote set-head origin --auto`.

You can read the git man page for more details:\
<https://git-scm.com/docs/git-remote#Documentation/git-remote.txt-emset-headem>

### 2. Modify .git/av/av.db file to replace the parent

In your repository `.git` directory has a file named `.git/av/av.db`. This file is a JSON document. If you open that, you can see sections like this:<br>

<figure><img src="/files/Mg44mUf3MA50NsGuHffF" alt=""><figcaption></figcaption></figure>

This file is used by the `av` CLI to track each branch's parent. You can change `master` to `main` or whatever default branch name change you are making for all existing branches. If you are unsure, please take a backup.

\
With these two steps, av should recognize main as master, including existing branches.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.aviator.co/aviator-cli/faqs-and-troubleshooting/updating-default-branch-from-master-to-main.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
