122 words
1 minutes
How to Undo Changes in GitHub Copilot CLI【/rewind】

Overview#

Ever asked Copilot to fix a file and it went in a completely unexpected direction?

No need to panic and reach for git checkout. The /rewind command rolls back the last change — both file modifications and the conversation turn.


Usage#

Run this in Copilot CLI:

/copilot> /rewind

All file changes from the last turn are reverted, and the conversation is rolled back one step.


/undo Works Too#

/undo is an alias for /rewind. They do exactly the same thing.

/copilot> /undo

Use whichever you prefer.


Things to Note#

  • Only the last turn can be rewound
  • To undo changes from two turns ago, you’ll need to revert manually
  • Both file changes and conversation history are rolled back

How to Undo Changes in GitHub Copilot CLI【/rewind】
https://naonao-na.com/en/posts/github-copilot-cli-rewind/
Author
[object Object]
Published at
2026-03-28