About ‘Discard all changes up to this checkpoint’

Hi team, if I accidentally clicked ‘Discard all changes up to this checkpoint’, where can I see what was discarded and how can I restore everything before the discard?

Hey, here are a few options to try to recover your changes:

  1. Earlier checkpoint: If you have other checkpoints in the same agent chat from before the one you discarded, try clicking Restore Checkpoint on an earlier message. You can hover over a previous message and use the restore button.

  2. Git restore: Run git status in the terminal. If you see deleted or modified files, git restore . can bring back anything that was previously committed.

  3. Local History: Right-click a file in the Explorer and look for Timeline or Local History. Cursor keeps local snapshots that might include your changes.

  4. OS-level recovery: Check Trash, Time Machine (Mac), or File History (Windows).

Unfortunately, if the discard was done from the checkpoint dialog and there’s no earlier checkpoint to restore, those changes may be permanently lost. For next time, making git commits before big operations is the safest fallback.

Let me know if any of these help.

1 Like