main, represents the content used to build your live documentation site. All other branches are independent of your live docs unless you choose to merge them into your deployment branch.
Branches let you create separate instances of your documentation to make changes, get reviews, and try new approaches before publishing. Your team can work on branches to update different parts of your documentation simultaneously without affecting what users see on your live site.
The following diagram shows an example of a branch workflow where you create a feature branch, make changes, and then merge the feature branch into the main branch.
Always work from branches when updating documentation to keep your live site stable and enable review workflows.
Branch naming conventions
Use clear, descriptive names that explain the purpose of a branch. Use:fix-broken-linksadd-webhooks-guidereorganize-getting-startedticket-123-oauth-guide
tempmy-branchupdatesbranch1
Create a branch
- Using web editor
- Using local development
- Click the branch name in the editor toolbar. If you don’t see it, show the branch selector.
- In Find a branch, type a descriptive title. If you leave it empty, the editor names the branch after the current date.
- Click New branch.
- If you have pending changes, choose Bring them to this branch or Leave them behind. Your original branch keeps its pending changes either way.
Save changes on a branch
- Using web editor
- Using local development
You don’t need to save manually. The editor commits your edits to the branch about 15 seconds after you stop editing. The first commit opens a pull request against your deployment branch.
Switch branches
- Using web editor
- Using local development
- Click the branch name in the editor toolbar to open the branch dropdown.
- Search for a branch by name or scroll through the list.
- Click the branch you want to switch to.
Merge branches
Once your changes are ready to publish, merge your branch into the deployment branch.- Using the editor
- Using local development
If Mintlify hosts your repository and your branch doesn’t require approvals, click Publish in the editor toolbar, then click Publish to merge your branch and publish your changes.Otherwise:
- Click Publish in the editor toolbar, then click Request review. This marks your branch’s pull request ready for review.
- Complete any required reviews and checks.
- Click Publish, then click Merge and publish.
Delete a branch
Delete branches you no longer need to keep the branch dropdown manageable.- Using web editor
- Using local development
- Click the branch name in the editor toolbar to open the branch dropdown.
- Hover over the branch that you want to delete.
- Click the Delete branch trash icon.
- Click Delete branch to confirm.