Skip to main content
Ryvn tracks whether each resource was last changed by git sync or by the dashboard/API. If you edit a git-synced resource through the dashboard, drift protection stops the next git sync from overwriting it. This gives you time to export those changes back to git before syncing again.

How it works

Each git-synced resource has a source: GITSYNC or API. When you edit a resource through the dashboard, Ryvn flips its source to API. The next git sync skips it. The resource stays in its dashboard-modified state until you either export the changes to a branch or remove protection.

Drift banner

When a resource is drift-protected, a yellow banner appears at the top of its page.
Drift protection banner and manage dialog
Click Manage to open a dialog with two options:
  1. Export to branch — pushes your dashboard changes to a git branch so you can open a PR
  2. Remove protection — deletes the drift record and re-syncs from git immediately, overwriting your changes

Exporting changes to git

When you export a drifted resource, Ryvn:
  1. Reads the current resource state from the database
  2. Diffs it against the existing files in the repository
  3. Creates or updates a branch with the changes (reuses an existing export branch if one exists)
  4. Returns a link to create a pull request
The drift record persists after export. Once your PR merges and the next git sync runs, the source flips back to GITSYNC and the resource syncs normally again.
Exporting does not remove drift protection. The resource stays protected until you explicitly remove protection or the exported changes sync back via git.

Removing drift protection

Removing protection does two things atomically:
  1. Deletes the drift record for the resource
  2. Triggers a full git sync to re-apply git state
Any changes you haven’t exported are lost. Use this when you want to discard your dashboard edits and go back to whatever git has.
This immediately overwrites the resource with git state. Export first if you have changes worth keeping.

Enabling and disabling

Drift protection is on by default for new Git Sync configurations. You can toggle it in Git Sync settings. When disabled, git sync overwrites all resources on every run regardless of how they were last modified. No resources are skipped and no drift banners appear.

Via the dashboard

Go to Settings > Git Sync and toggle Drift protection.

Via API

Drift protection is a Git Sync-level setting, not per-resource.
# Enable (default for new configurations)
curl -X PATCH /v1/orgs/{orgId}/git-sync \
  -d '{"driftProtectionEnabled": true}'

# Disable (sync overwrites everything)
curl -X PATCH /v1/orgs/{orgId}/git-sync \
  -d '{"driftProtectionEnabled": false}'

Supported resources

All resource types managed by git sync support drift tracking:
ResourceDrift trackedExport supported
ServiceYesYes
EnvironmentYesYes
BlueprintYesNo
Promotion PipelineYesYes
Release ChannelYesYes
Maintenance WindowYesYes
Service InstallationYesYes
Blueprint InstallationYesYes
Blueprints track drift but can’t be exported — they’re code-only resources, so changes must be made directly in git.

Checking drift status via API

GET /v1/orgs/{orgId}/git-sync/resources/{resourceId}/drift-status
{
  "drifted": true,
  "currentSource": "API",
  "lastModifiedAt": "2026-03-10T12:00:00Z"
}
To resolve drift programmatically:
POST /v1/orgs/{orgId}/git-sync/resources/{resourceId}/resolve-drift

Sync results for drifted resources

Skipped resources show up in git sync task results with status skipped:
{
  "resourceKind": "Service",
  "resourceName": "api",
  "status": "skipped",
  "reason": "resource modified via API; resolve drift to resume git sync"
}
A sync that skips drifted resources but otherwise succeeds reports as COMPLETED_WITH_WARNINGS or PARTIAL_SUCCESS.