Visual editing /Visual Editor /Cloud setup /

Git branching

The visual editor interacts with branches in your remote Git repository when in cloud setup mode (not local development). In this mode, the visual editor works with two Git branches — a target and working branch.

# Target branch

The visual editor uses the target branch to deploy the live site. This is also the branch where code is merged when publishing.

The target branch defaults to the default branch of the repository (e.g. main or master) when creating a new project.

# Working branch

The visual editor uses the working branch to run your site in the container. The working branch is the branch that content editors work with.

This branch name defaults to preview, which gets automatically created when a new site with visual editing enabled is created.

Learn more about changing the working branch.

# External updates

Visual Editor uses webhooks to listen for updates to the working branch in its remote repository, then immediately updates the local branch.

# Branch synchronization

The target branch is only used during the publishing process.

Keeping the working branch in sync with changes committed to the target branch must be handled separately. This process may be able to be automated, depending on your preferred workflow.

# Configure branches

You can override these defaults from your visual editor settings or when you create a new site.

Target and Working Branch settings.

# Change working branch

As a Developer or Owner, you can adjust the working branch of your site for use with the visual editor.

  1. Go to your visual editor settings:
    • From your site workspace in the visual editor, select the options icon next to your site name and select Visual editor settings from the drop-down menu. Visual editor dashboard UI showing a drop-down menu with the visual editor settings option
    • From your Site overview where you manage site deploys, go to . Then select Edit. Site configuration UI showing the Edit button and current working branch setting
  2. Choose an existing branch to use as the working branch. Note that you will not find the target branch as an option. You must work on a separate branch.

Before you start editing and publishing, we recommend you confirm you’re using the correct branches.