How to Roll Back Changes with Revert and Checkpoints
Learn how to use eLLM Code's revert and checkpoint features to undo unwanted changes without affecting your git history. This guide explains the process and requirements for rolling back changes effectively.
Estimated time: 3 minutes
Difficulty: Beginner
Why you'd use this
An applied change turns out to be wrong, or a whole request went in a direction you did not want. eLLM Code keeps its own snapshots, in a shadow repository separate from your git history, so you can undo the assistant's file changes without touching your own commits or losing the conversation. Revert rolls back everything since the last request started; Restore lets you pick any earlier checkpoint.
Before you start
Permissions required:
- Write access to the workspace.
You'll need:
- Git installed and on PATH. Snapshots are stored under the
.project-ai/folder and driven through git, but nothing is written to your project's own.git.
Steps
- Apply some changes through the chat. Notice the "Checkpoint" activity line after each applied file; a snapshot is also taken before each request starts.
- To undo the whole last request, press / and choose Revert last request (roll back its changes), or run eLLM: Revert Last Request. A note lists the files restored, and the conversation is kept.
- To go back further, choose Restore checkpoint (revert applied files). A list of checkpoints opens, each labelled with the file or request it followed and its time.
- Pick one. Workspace files are restored to that point; the chat history stays.
- Tell the assistant what you reverted, for example "I reverted the router change, take a different approach", so it does not assume its earlier edits are still on disk. It is also told automatically that file contents changed.
What you should see
Restored files reopen with their earlier content, and the assistant's cached view of the project is refreshed so its next read reflects the restore. Your own uncommitted edits to files the assistant never touched are left alone.
Troubleshooting
- "no request checkpoint to revert to yet": nothing has been applied in this session. There is nothing to undo.
- "Revert failed (is git installed?)": install git or make it available on PATH, then reload the window.
- You need the change back after reverting: checkpoints are not removed by a revert, so restore the later checkpoint from the list.
Related guides
- How to Make Code Changes with Reviewable Diffs
- How to Show the Audit Log and Debug Trace
person people found this useful.