Answer
Drift is when the live cluster state diverges from the declared state in Git—e.g., someone manually edits a deployment. GitOps detects drift by continuously comparing live vs desired, marks the app OutOfSync, and can auto-heal by reapplying Git's state, restoring the intended configuration and preventing untracked changes.
spec:
syncPolicy:
automated:
selfHeal: true # revert manual drift back to Git stateReal-world example An engineer manually scales a deployment; ArgoCD flags OutOfSync and, with selfHeal on, reverts it to the Git-defined replica count.