GitOps is a way of running servers where a Git repository holds the full description of what should be running, and automation keeps the real systems matching it. Every change becomes a reviewed commit, so you can always see what is deployed and who changed it.
The problem: changes nobody can trace
Picture a team running a handful of services. Most changes go through a deploy script, but now and then someone logs into a server and edits a config file by hand, to raise a memory limit or flip a feature flag during an incident. It works, and nobody writes it down.
A few weeks later, things start to go wrong:
- No record: nobody can say what changed, when, or why.
- No rollback: there is no earlier version to go back to, only someone's memory of what the file used to say.
- Drift: two servers that should be identical behave differently, because one was edited and the other wasn't.
- Snowflake servers: if a server dies, rebuilding it exactly is guesswork, because its real configuration only ever existed on that machine.
Each manual edit is small. Together they leave you with servers whose real state nobody can describe.
What GitOps changes
GitOps takes the tools developers already trust for code, Git history and pull request review, and applies them to everything that describes a running system.
Git is the source of truth
One repository, or a small set of them, describes the whole system: the app's configuration, the infrastructure it runs on and the deployment settings, such as which image version to run and how many copies. If it isn't in Git, it shouldn't exist on the servers.
The files describe what you want, not how to get there
GitOps relies on declarative configuration. Rather than a script of steps ('stop the old container, pull the new image, start it again'), the files state the end result ('run three copies of version 1.5'). Kubernetes manifests, Helm charts and Terraform files all work this way. Declarative files are what make the next part possible: a program can compare 'what the file says' with 'what is running' and work out the difference itself.
Wondering how this was made? How we make these