GitOps

GitOps is an operating model in which the desired state of a system is stored declaratively in a Git repository, and that repository serves as the single source of truth for what should be running. Changes are made by committing to Git, typically through a pull request, and software agents then bring the live environment into agreement with whatever the repository says. The term was popularized by Weaveworks, whose CEO Alexis Richardson framed the idea in 2017 in a post titled “GitOps - Operations by Pull Request,” describing operations workflows driven entirely through Git.

The clearest formal definition comes from the OpenGitOps project, a community effort run as a GitOps Working Group under the Linux Foundation. OpenGitOps describes itself as “a set of open-source standards, best practices, and community-focused education to help organizations adopt a structured, standardized approach to implementing GitOps,” and publishes four principles that characterize a GitOps system.

Those four principles are that the system’s desired state is expressed declaratively; that the desired state is stored in a way that is versioned and immutable, with a complete history; that approved changes are pulled automatically by software agents rather than pushed manually; and that those agents continuously observe the actual state and reconcile it toward the desired state. The continuous reconciliation step is what distinguishes GitOps from simply storing configuration in Git: the system actively detects and corrects drift between what the repository declares and what is actually running.

GitOps grew up alongside Kubernetes, whose declarative, API-driven model fits naturally with a reconciliation loop watching a repository. A GitOps agent compares the cluster’s current state with the manifests in Git and applies whatever changes are needed to close the gap, so the repository becomes both the deployment mechanism and the audit log. Rolling back a bad change becomes a Git revert, and the history of the system is the history of the repository.

By building on declarative infrastructure as code and on Git’s review and audit machinery, GitOps extends continuous delivery into a continuously enforced model of operations. It treats the running environment as a function of the repository, aiming for systems that are reproducible, auditable, and self-correcting rather than configured by hand.