undo¶
Reverse every journaled rename, restoring original paths.
undo reads .ingest/apply-log.jsonl and replays every move in reverse, newest first, putting each file back at its original path. It is how you back out an apply you did not want.
Options¶
--yesskips the confirmation prompt.--rootpoints at a specific project directory.
Example¶
Restore all renamed files under /Volumes/T7/PROJECTS/2026-03_my-trip to their original paths? [y/N]: y
restored: 1789 errors: 0
How it works¶
undo reads the journal that apply wrote. For each recorded move, walking from the most recent backward, it checks that the renamed file is present and its original path is free, then renames it back. If the renamed file is missing, or the original path is now occupied, that one restore is reported as an error and the file is left as it is. undo reports how many files it restored and how many errored, and exits non-zero if anything errored.
Idempotent¶
undo records its own reversals in the same journal, so running it twice does not error on already-restored files: the second run sees that those moves are already undone and skips them. If you undo, then apply again, then undo again, the journal keeps the bookkeeping straight.
When to use undo versus re-running apply¶
- To change your mind about an apply you completed, run
undo. - To finish an apply that was interrupted, do not undo. Just run
applyagain. Because apply is idempotent, it picks up where it left off. See the safety model.