Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions editor/branching-and-publishing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
keywords: ["editor", "branch", "publish", "pull request", "preview", "git", "merge", "deploy"]
---

The web editor autosaves everything as you type, but your changes are only live when you choose to publish them.

Check warning on line 7 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L7

Did you really mean 'autosaves'?

What happens when you publish depends on two things: **which branch you're on** and **whether that branch requires pull requests**.

## Saving versus publishing

**Saving** happens automatically. Your edits are stored on Mintlify's servers and persist across browser tabs, devices, and network interruptions.

Check warning on line 13 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L13

In general, use active voice instead of passive voice ('are stored').

**Publishing** commits your changes to your Git repository. Click the **Publish** button in the toolbar to open the publish menu, save your changes as a Git commit, and create a pull request.

Expand Down Expand Up @@ -38,7 +38,7 @@
- **Create branch**: Moves your pending changes to a new feature branch when you're on a protected deployment branch.
- **Create pull request**: Opens a pull request targeting your deployment branch.

If there are no pending changes, the publish and save actions are disabled.

Check warning on line 41 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L41

In general, use active voice instead of passive voice ('are disabled').

<Note>
Your live site updates after Mintlify builds and deploys your changes. This typically takes 30 seconds to a few minutes. Check the deployment status on your [dashboard](https://dashboard.mintlify.com).
Expand All @@ -48,7 +48,7 @@

**Edit directly on your deployment branch** if you do not use a Git-based workflow.

**Create a branch** when you use a docs-as-code workflow where each change to your content is made on a separate branch.

Check warning on line 51 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L51

In general, use active voice instead of passive voice ('is made').

## Create and switch branches

Expand All @@ -70,7 +70,7 @@
1. Click the branch to switch to it.

<Note>
Switching branches while you have unpublished changes will prompt you to bring those changes to the new branch or leave them behind. Changes left behind remain on your original branch.

Check warning on line 73 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L73

Avoid using 'will'.
</Note>

<Tip>
Expand Down Expand Up @@ -110,16 +110,29 @@

## Review and merge pull requests

When a pull request is open for the current branch, the publish menu shows its review status:
When a pull request is open for the current branch, the publish menu shows a review panel with:

- The pull request title, description, and status (**open** or **draft**).
- The source and target branches.
- The number of changed files.
- The approval requirement on the deployment branch: **Approval required**, **Code owner required**, or your Git provider's default review.

The panel also shows the current review status:

- **Approved**: The pull request has been approved and is ready to merge.

Check warning on line 122 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L122

In general, use active voice instead of passive voice ('been approved').
- **Changes requested**: A reviewer has requested changes before the pull request can merge.
- **Awaiting review**: The pull request is waiting for a reviewer.

Click **View request** to open the pull request in your Git provider.
Click **Open in GitHub** or **Open in GitLab** to view the pull request in your Git provider.

When the pull request is approved, click **Merge and publish** to merge and deploy directly from the editor. The editor switches to your deployment branch after merging.

Check warning on line 128 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L128

In general, use active voice instead of passive voice ('is approved').

### Approve pull requests from the editor

For GitHub repositories, reviewers can approve open pull requests without leaving the editor. When an open pull request appears in the publish menu and your account has permission to review it, click **Approve pull request** in the review panel. The review status updates to **Approved** and the **Merge and publish** action becomes available if all other requirements are met.

Check warning on line 132 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L132

In general, use active voice instead of passive voice ('are met').

If approval fails, open the pull request in GitHub to complete the review there. The approve action is not available for draft pull requests, already-approved pull requests, or GitLab merge requests—use **Open in GitLab** to approve a merge request in GitLab.

<Tip>
Configure branch protection rules in your Git provider to require pull requests. See [About protected branches](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) in the GitHub docs or [Protected branches](https://docs.gitlab.com/user/project/repository/branches/protected/) in the GitLab docs.
</Tip>
Expand All @@ -144,13 +157,13 @@

## Collaborate in real time

When multiple people open the same page on the same branch, they edit together in real time. Each person's cursor and edits are visible to everyone, with avatars shown in the toolbar.

Check warning on line 160 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L160

Use 'Cursor' instead of 'cursor'.

- Changes from all collaborators merge automatically. Two people editing the same section won't create conflicts.
- Undo only affects your own edits.
- If you lose your connection, edits save locally and sync when you reconnect.

When the [Mintlify agent](/agent) edits a page through the API or MCP, it appears in the editor like any other collaborator. You see the agent's avatar in the toolbar and a live cursor at its most recent edit location. The cursor clears automatically after the agent finishes.

Check warning on line 166 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L166

Use 'Cursor' instead of 'cursor'.

Check warning on line 166 in editor/branching-and-publishing.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/branching-and-publishing.mdx#L166

Use 'Cursor' instead of 'cursor'.

## Git sync

Expand Down
Loading