How Git Sync Works
Each sync cycle pulls the configured branch, imports changes from Git into the Automation Server, exports local automation changes, and pushes a commit when the synchronized files changed. By default, each automation is stored in its own directory under the configured path:automation.yaml file stores the automation configuration. Files from an uploaded automation bundle are expanded under tarball/ so Git can show meaningful diffs.
Git Sync is bidirectional. A change made in Agent Canvas is exported to Git, while a change merged into the synchronized branch is imported into Agent Canvas during the next cycle. If the same automation has pending local changes, the local version takes precedence for that cycle.
Requirements
Before configuring Git Sync, make sure you have:- A healthy Agent Canvas backend with a version of Automation Server that supports Git Sync
- Permission to manage automations on that backend. On a cloud backend, Git Sync is available to organization admins and owners
- A Git repository and branch dedicated to the synchronized automation files
- An HTTPS access token with read and write access when the repository is private
Configure Git Sync
- Open the
Automateview in Agent Canvas. - Select
Git Syncnear the top of the automation list. - Configure the repository:
Repository URL: The HTTPS clone URL, such ashttps://github.com/example/automation-backup.git.Branch: The branch Git Sync pulls from and pushes to. The default ismain. Git Sync creates the branch during the first cycle if it does not exist.Path: The repository-relative directory that holds automation files. The default isautomations.Access token: Required for private repositories. The token needs permission to read and push repository contents.
- Set
Sync every (seconds):- Enter
0to sync only when you selectSync now. - Enter a positive number to run automatic sync cycles at that interval.
- Enter
- Optionally set the commit author name and email. Leave these fields blank to use the backend defaults.
- Optionally enter an encryption key. See Encrypt Synchronized Files before enabling this option.
- Optionally turn on
Keep automation activation status local. See Keep Activation Status Local. - Turn on
Enable Git Sync. - Select
Save and sync now.
Encrypt Synchronized Files
An encryption key encrypts each automation file before it is committed. The repository then contains ciphertext instead of readable YAML and script content. Encryption protects the contents stored in Git, but it also prevents normal code review and meaningful diffs. Use it when repository-level access controls are not sufficient for the sensitivity of your automation definitions. The access token and encryption key entered in Agent Canvas are encrypted before the Automation Server stores them. Leaving either secret field blank keeps its current value. Use the corresponding clear option when you intend to remove a stored secret.Edit Automations Through Git
Use a pull request when you want to review automation changes before Agent Canvas imports them:- Create a branch from the synchronized branch.
- Edit the automation’s
automation.yamlor files undertarball/. - Open and review a pull request.
- Merge the pull request into the synchronized branch.
- Wait for the next automatic cycle or select
Sync now. - Open the automation in Agent Canvas and confirm the imported configuration before running it.
If file encryption is enabled, edit automations in Agent Canvas instead. Encrypted repository files are not directly editable or reviewable.
Keep Activation Status Local
By default, Git Sync treats whether an automation is turned on as part of its definition. Turning an automation on or off in Agent Canvas changesenabled and state in its automation.yaml, and Git Sync applies the values it finds in Git.
Turn on Keep automation activation status local to manage that status in Agent Canvas only. Use it when Git records what each automation does and each backend decides which automations run. The option is off by default and applies to the whole organization.
While the option is on:
- Turning an automation on or off does not create a pending change or a commit. This includes automations that OpenHands turns off after repeated failures.
- Git Sync leaves
enabledandstateout of theautomation.yamlfiles it writes. Other changes to the automation sync as usual. - An existing automation keeps its current status when its files change in Git. Git Sync ignores the
enabledandstatevalues in those files. - A new automation imported from Git starts turned off. Turn it on in Agent Canvas when it is ready.
enabled or state line already in a file stays there until Git Sync next writes that automation.
Turning the option off does not change the status of any automation. The next sync writes the current status of each automation to Git, and status changes sync in both directions again. During that sync, the Agent Canvas version of each automation takes precedence over Git changes that are not imported yet. Select Sync now before you turn the option off to import those changes first.
Pause or Run Sync Manually
Turn offEnable Git Sync and save to pause synchronization without deleting the repository configuration. Turn it on again to resume.
Select Sync now to start a cycle immediately. The request schedules the cycle in the background, and the activity row follows it until it succeeds or fails. If another cycle is already running, Agent Canvas follows that cycle instead of starting a duplicate.

