## Lesson — Cache original file content and reset the Git index

**Tags:** git, reliability, dx

Cache original file content and reset the Git index if an automated fix-and-commit sequence fails. This ensures the user's working tree remains clean and predictable after a failed automation attempt.
