diff --git a/editor/git-essentials.mdx b/editor/git-essentials.mdx index 60967f11b..133788f16 100644 --- a/editor/git-essentials.mdx +++ b/editor/git-essentials.mdx @@ -67,3 +67,19 @@ Every action you take in the web editor corresponds to a Git operation. | 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. + + + Commits made from the web editor are recognized automatically and do not trigger a sync back into the editor. + diff --git a/editor/publish.mdx b/editor/publish.mdx index d32caed34..86a504109 100644 --- a/editor/publish.mdx +++ b/editor/publish.mdx @@ -73,8 +73,15 @@ Conflicts occur when your branch and the deployment branch have incompatible cha 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. + +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.