When you sync your Infrastructure as Code with a Git rebase, you expect the truth — the source of record matching the real world. But reality drifts. Servers get configured outside of the repo. Permissions change without a commit. Variables shift when no one is looking. That silent gap between your Git history and your deployed infra is IaC drift, and it destroys trust.
Git rebase makes merging cleaner by replaying commits, but it can also overwrite changes you don’t see. If your team isn’t running IaC drift detection in lockstep with every rebase, you’re flying blind. You may push code thinking you’re restoring order while letting unseen differences persist. The issue compounds in large-scale environments, where one missed drift can cascade into outages or security breaches.
The answer is to make Git rebase and IaC drift detection part of the same motion. Rebases should trigger automated state comparisons between desired configuration in Git and actual deployed infrastructure. This pairing catches rogue changes as they happen and makes the repo the single source of truth again. Without that, you’re left reconciling reality long after damage is done.