#Warp just discarded all my changes

5 messages · Page 1 of 1 (latest)

silk gyroBOT
#

Hi @open heart. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry to hear about your experience—losing local changes is understandably very frustrating.

Based on the knowledge sources, Warp provides a Code Review panel that allows you to review, revert, or discard uncommitted changes. When you use the "Discard all" option in the Code Review panel, Warp is designed to show a confirmation modal before actually removing your changes, making it clear that this action will restore files to their state on the base branch. However, once you confirm, all local modifications are removed and cannot be recovered from within Warp unless you have them saved elsewhere or committed to version control. There is also an option to stash changes instead of discarding them, which saves your work in git's stash for later retrieval. This is the recommended way to avoid accidental data loss if you are using git for version control Reviewing diffs.

If you were unable to copy from the diff preview, it's likely because once changes are discarded, they are immediately removed from your working directory and the diff view is cleared. This behavior is by design, but it does mean that if you confirm the discard, the changes are lost unless previously saved or stashed.

How to prevent this in the future:

#
  • Commit or stash your changes frequently: Use git or another version control system to regularly save your work. Warp's team strongly recommends this, especially when working with AI agents or making large changes AI Checkpoints / Undo.
  • Use the stash option: When discarding changes in the Code Review panel, choose to stash instead of discard if you might want to recover them later.
  • Be cautious with the discard action: Always double-check the confirmation modal before proceeding, as this action is irreversible within Warp.
  • Request improvements: If you feel the current workflow is not safe enough, you can provide feedback to the Warp team. There are ongoing discussions about adding features like checkpoints or undo for AI-generated changes, but as of now, these are not yet implemented AI Checkpoints / Undo.

Unfortunately, if your changes were discarded and not committed or stashed, there is no built-in way in Warp to recover them. This is a known pain point, and several users have requested more robust undo or checkpoint features, which are reportedly on the roadmap but not yet available.

If you have further suggestions on how the confirmation or discard process could be improved, the Warp team is open to feedback and feature requests Deleted my entire project from local disk when I rejected changes.

#

Summary:
Discarding changes in Warp is a destructive action that, once confirmed, cannot be undone unless you have used version control or stashing. To prevent future data loss, commit or stash your work frequently and be cautious with the discard option. The Warp team is aware of the need for better undo/checkpoint features and is working on improvements.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@open heart Kapa.ai is still learning and improving, please let me know how I did by reacting below.