Skip to main content

Migrate from Git Syncing to Source Control

Learn how to migrate from Git Syncing to Source Control.

Available on:Enterprise plan

At a high level, migrating to Source Control entails the following:

  • 1-time set up. Source Control can be set up on any of the instances you are hosting. Once you’ve set it up once, you can share the same configuration/secrets across all your instances.
  • 1 default branch, 1 repo. Instead of having multiple branches (development, staging, and production), Retool recommends one main branch. All your instances configured with Source Control can be pointing at that branch. Instead of merging from branch to branch to manage and promote changes, Releases can be used to manage what end users see, and how applications get updated.
  • Granular control at the app level. There is no longer a need to use VERSION_CONTROL_LOCKED=true to disable editing on an instance. Instead you can lock down and sync specific apps under Source Control, leverage releases, and/or use permissions to manage who (or if anyone) can edit and create apps in a particular instance.

Depending on whether you’ve already set up Source Control or not, follow the respective guide below.

From Git Syncing to Source Control

  1. Upgrade to version v2.69.17 or higher.

  2. While end users should not be affected, all editors should be alerted and requested to not make any changes during this migration.

  3. Set up Source Control on an instance, following our Source Control documentation. If you have multiple instances, this is typically your development instance.

  4. On all instances, disable Git Syncing.

    1. Set DISABLE_GIT_SYNCING=true, and VERSION_CONTROL_LOCKED=false
    2. Remove Git Syncing configuration repo url and branch name in Advanced Settings:

  1. For multiple-instance setups:

    1. In all previously “read-only” instances, copy over Source Control related ENV vars from the instance that’s already configured to use Source Control: GITHUB_APP_ID, GITHUB_APP_INSTALLATION_ID, GITHUB_APP_PRIVATE_KEY
    2. Configure Source Control on other instances. If you are using a “Git Flow” style of development with multiple branches, you now have the option to move to a single branch flow and use Release Management to gate what end-users see. Retool strongly recommends using 1 branch, typically called main.
  2. After a few minutes, across all instances, apps that are protected will now be marked as such and edits will not be able to be made directly to those apps. Releases will continue to pin any apps. If there are apps you do not want to appear in any particular instance anymore, you can manually delete them.

  3. You can now archive the git repository associated with Git Syncing.