AI News Daily한국어
← AI tool tips
Claude Code✓ Confirmed in official docsAdded Oct 24

How to revert Bash changes in Claude Code that /rewind doesn't undo, using git

Claude Code's /rewind only tracks files that Claude has edited with its file editing tools. A file that only Bash commands changed, without Claude ever touching it with an editing tool, stays as it is when you rewind. Since v2.1.309, sed -i also gets the standard Bash prompt and runs as written, like any other Bash command, instead of a simulated file-edit preview, so /rewind no longer restores it either.

  1. Before rewinding, check which files changed with git.
git status --short
git diff --stat
  1. Open /rewind. The file-change count under each prompt only covers files Claude had already edited. A file git reports as changed that doesn't appear there was changed only by Bash.

  2. Revert those files with git.

git restore path/to/file

If the same file also has your own uncommitted edits, git restore wipes those too, so check git diff path/to/file first. For a file Claude has edited with its editing tools, /rewind also undoes the Bash changes made to it afterward.

Get notified when a new tip lands

Tip alerts only go out in the app. Install it and turn notifications on.

Get the app

All tips →