← Alle Concepts
pattern·free·ai_rollback_pattern

Safe AI rollback (no git reset --hard)

Three safe paths to undo: GUI revert, /rewind in Claude Code, or explicit checkout with named commit. Never give vague "undo it" prompts to the AI.

Claude Code Issue #17190 (Jan 2026) documented vague "undo" prompts being translated to destructive `git reset --hard`, costing hours of uncommitted work. Three safe alternatives: (a) GUI revert in GitHub Desktop or VS Code, (b) Claude Codes built-in /rewind for in-session undos, (c) explicit prompt with named commit and target file. Bake the rule into CLAUDE.md so the AI never reaches for the destructive default.

Quellen

Beziehungen

Outgoing
Eingehend
gitsafetyrollbackai-coding