Skip to content

Create from Git Repository

You can enable the visual editor for a site from a Git repository, including repositories hosted on these Git providers:

  • GitHub
  • Bitbucket

To learn more about getting started with setting up a site from a Git repository, check out these docs:

For a site to work with the visual editor, it must meet these requirements:

To operate correctly with your repository, the visual editor needs the ability to commit and merge code, create branches and add a webhook. Because the visual editor operates on behalf of a Git user, your Git user must have the necessary read and write permissions on the repository.

How your Git user is connected to the visual editor depends on the Git service provider you’re using. You will be guided through the process after choosing the appropriate Git provider.

When creating a new project, the visual editor either infers or has sensible defaults for the Git branches it uses:

  • Target Branch (production): Matches the repository’s primary branch (usually main or master).
  • Working Branch (development/editing): Defaults to preview, and is automatically created for new projects when it doesn’t exist.

You can make adjustments to these defaults as needed. Learn more about Git branches in the visual editor.