Branches are a feature of version control that point to specific commits in your repository. Your deployment branch, usually called main, represents the content that is used to build your live documentation. All other branches are independent of your live docs unless you choose to merge them into your deployment branhc. 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 at the same time without affecting what users see on your live site until you publish any changes. We recommend always working from branches when updating documentation to keep your live site stable and enable review workflows.
  • Name branches clearly so teammates understand what you’re working on.
  • Delete branches after merging to keep your repository organized.
  • Let your team know when you’re working on major changes that might affect their work.

Creating a branch

  1. Select the branch name in the editor toolbar (usually main by default).
  2. Select New Branch.
  3. Enter a descriptive name for your branch like update-getting-started or fix-api-examples.
  4. Select Create Branch.

Saving changes on a branch

To save your changes on a branch, select the Save Changes button in the top-right corner of the editor. This creates a commit and pushes your work to your branch.

Switching branches

  1. Select the branch name in the editor toolbar.
  2. Select the branch you want to switch to from the dropdown menu.
Unsaved changes are lost when switching branches. Make sure to save or publish your work before switching branches.