You wrote the code. You committed the changes. You pushed to main. But the infrastructure running in production has drifted. Configuration has mutated outside of Git. Someone changed a security group directly in the console. A forgotten debug setting stayed live. This is Infrastructure as Code drift, and it will break deployments you thought were stable.
Git checkout IaC drift detection is the fastest way to see what’s changed between what you committed and what exists in reality. At its core, this means comparing the desired state in your version-controlled Infrastructure as Code against the actual state in your cloud provider. The goal is zero deviation between the two.
Drift detection starts with a clear source of truth in Git. When you run git checkout on the branch that matches your intended environment, you have the exact configuration your systems should be running. The next step is to scan the deployed resources and detect differences. Tools like Terraform’s plan, Pulumi’s refresh, or custom Git-based workflows can expose drift fast. Once detected, every mismatch becomes a decision: revert in production to match Git, or update Git to match validated changes.