Netlify Create /Cloud project /

Git branching

Netlify Create cloud projects interact with branches in your remote Git repository. Cloud projects work with two Git branches — a target and working branch.

# Target branch

The target branch is the one Netlify Create uses to deploy the live site if using managed hosting. This is also the branch where code is merged when publishing.

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

# Working branch

Netlify Create uses the working branch to run your site in the container. This is the branch that content editors work with.

This branch name defaults to preview, which gets automatically created when a new cloud project is created.

# Code editor updates

Every update to the code prompts an immediate commit to Git history and push to the remote repository. This minimizes conflicts when collaborators make nearly simultaneous changes.

# External updates

Netlify Create 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 in the advanced settings when creating a new project from GitHub.

Target and Working Branch settings.

# Change working branch

You can also adjust the working branch after creating a project through the advanced settings.

Open advanced settings.

  1. Click gear icon next to project name.
  2. Select Advanced tab.

Then you'll be able to choose an existing branch to use as the Netlify Create working branch. Note that you will not see the target branch as an option. You must work on a separate branch.

Select Working Branch.

Note

Be sure to verify you're working with the correct branches before starting to edit and publish content.