Undo what a coding agent changed: git vs snapshots
undohaven restore --to SNAPSHOT_ID --scope all. Git can put a repository back to a commit. It does not cover the dsh home, session logs, or files the agent never committed. A snapshot covers the agent home. Tools that undo a single edit are a different job from a full home snapshot.
Steps
- For tracked project files, use git in that repository. UndoHaven does not replace git history.
- For the dsh home, quit dsh and run undohaven restore --to SNAPSHOT_ID --scope all. Narrow it with --scope sessions, storages, or config.
- See also the undo-dsh-changes page for a dsh-specific restore.
Without UndoHaven
If the only copy of a file was uncommitted and not in a snapshot, neither git nor UndoHaven can recreate it.