> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voiceflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Merging

> Bring another environment's changes into Main once you're ready to make them the default.

<img src="https://mintcdn.com/voiceflow-009a8802/m2AwTYepiz1ibdK4/images/Merge-Diff.png?fit=max&auto=format&n=m2AwTYepiz1ibdK4&q=85&s=5c94a28891b2969ad6d5f9068542f0b1" alt="Merge Diff" width="2682" height="1164" data-path="images/Merge-Diff.png" />

Merging replaces `Main`'s live version with the live version of the source [environment](/documentation/deploy/environments), and adds a new entry to `Main`'s version history.

#### Things to know before you merge to Main

* Merges use the source environment's live version, not its draft. Publish that environment first if you want its current edits in the merge.
* Merges replace, they don't combine. Whatever is on the source environment replaces what's on `Main` entirely. Any changes made to `Main` after the source environment was created are overwritten.

<Info>
  If Main has live changes since you created your environment, clone a fresh environment from Main, apply your changes there, and merge that. This avoids overwriting recent work.
</Info>

## Merging to main

To merge a branch into `Main`, click the more button button on the environment's row in **Settings** → **Environments**.

<Frame>
  <img src="https://mintcdn.com/voiceflow-009a8802/JSaXjbI0-V7PORiH/images/CleanShot-2026-04-29-at-13.09.52@2x.png?fit=max&auto=format&n=JSaXjbI0-V7PORiH&q=85&s=890425af5b543bcf8d85bf02866c3ab3" alt="Clean Shot 2026 04 29 At 13 09 52@2x" width="2564" height="1038" data-path="images/CleanShot-2026-04-29-at-13.09.52@2x.png" />
</Frame>

The merge modal shows a side-by-side comparison of `Main`'s live version and the source environment's live version. Check **delete environment after merging** if you no longer need it, then click **Merge** to confirm. The new live version appears at the top of `Main`'s version history with a description noting the merge source.

If you leave **delete environment after merging** unchecked, the environment stays in **Settings** → **Environments** with its own version history intact, which is useful when you want to keep iterating on it and merge into `Main` again later.

<Warning>
  Checking **delete environment after merging** discards the environment and its version history, including any unpublished draft changes that weren't part of the merge. Publish the environment before merging if you want those changes included.
</Warning>

## Reverting a merge

A merge is a new version on `Main`, so reverting `Main` to the previous version undoes it. Open the [version history](/documentation/deploy/environments/version-history) for `Main`, pick the pre-merge version, and click **Revert**.

<img src="https://mintcdn.com/voiceflow-009a8802/m2AwTYepiz1ibdK4/images/Revert.png?fit=max&auto=format&n=m2AwTYepiz1ibdK4&q=85&s=1cc3cf3078c6ab8585baaf93031cac97" alt="Revert" width="2682" height="1164" data-path="images/Revert.png" />
