Version Control with Git
Available on: >= 0.17.0
Best practices for version control with Git in Kestra.
By default, all Kestra flows are automatically versioned using Revisions. You don't need an additional version control system to track changes to your flows. Kestra automatically creates a new revision each time you save a flow, allowing you to view change history, compare revisions, and restore previous versions at any time.
However, if you want to use Git to manage your flows and namespace files, you can do so with Kestra’s built-in Git integration.
There are multiple ways to use Git with Kestra:
- The git.SyncFlows pattern enables a GitOps approach, using Git as the single source of truth for your flows.
- The git.SyncNamespaceFiles pattern enables GitOps for your namespace files.
- The git.PushFlows pattern allows you to edit flows from the UI and automatically commit and push changes to Git—ideal if you prefer using the built-in editor while keeping your code synchronized with Git.
- The git.PushNamespaceFiles pattern allows you to edit namespace files from the UI and push updates to Git.
- The CI/CD pattern is ideal if you prefer managing the CI/CD process manually (for example, using GitHub Actions or Terraform) while keeping Git as the single source of truth for your code.
- Clone task clones a repository directly into a flow, making scripts available for execution.
- TenantSync task synchronizes all namespaces in a tenant, including flows, files, apps, tests, and dashboards.
- NamespaceSync task synchronizes objects within a single namespace with your Git repository.
The diagram below illustrates how to choose the right pattern for your workflow:

For a detailed comparison of these patterns, see the Version Control with Git page.
Was this page helpful?