Skip to content
Open
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions editor/git-essentials.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,19 @@
| Create a branch | Create a **branch**, a separate line of work that doesn't affect your live site unless you choose to publish it |
| Publish on your deployment branch | Push your commit directly, which triggers a deployment |
| Publish on a feature branch | Create a **pull request**, a proposal to merge your changes into the deployment branch |

## How Git changes sync to the editor

When someone pushes changes to your repository outside the web editor (for example, from a local editor or a merged pull request), the web editor automatically incorporates those changes using a three-way merge.

The merge compares three versions of each affected page:

- **Base**: The last version both the editor and Git agreed on.
- **Local**: Your current editor content, including any unsaved edits.
- **Remote**: The newly pushed version from Git.

Changes that don't overlap with your local edits apply automatically. If Git changes and your local edits affect the same part of a page, the editor highlights the conflicting sections so you can decide which version to keep.

<Note>
Commits made from the web editor are recognized automatically and do not trigger a sync back into the editor.

Check warning on line 84 in editor/git-essentials.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/git-essentials.mdx#L84

In general, use active voice instead of passive voice ('are recognized').
</Note>
7 changes: 7 additions & 0 deletions editor/publish.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,15 @@
Conflicts happen when you try to merge branches with incompatible changes to the same files.

- You and another team member edit the same lines in a file on different branches.
- Someone pushes changes to your repository that overlap with your unsaved edits in the editor.
- You move, rename, or delete files on one branch and modify them differently on another branch.

### How the editor handles incoming changes

When changes are pushed to your repository from outside the editor, the editor merges them into your current content automatically. Non-overlapping changes apply without interrupting your work. If incoming changes conflict with your edits, the editor highlights the affected sections so you can review them.

Check warning on line 81 in editor/publish.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

editor/publish.mdx#L81

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

See [How Git changes sync to the editor](/editor/git-essentials#how-git-changes-sync-to-the-editor) for more details on how the merge works.

### Resolve conflicts

The editor displays warnings when conflicts prevent operations like publishing or switching branches. To resolve conflicts, follow the instructions in the editor to choose which changes to keep.
Expand Down
Loading