Throw away edits to one file
tovio restore, the one command that can lose work.
Written By Dustin
Last updated 32 minutes ago
tovio restore <file>Discards your uncommitted edits to that file, returning it to its content at the current lane's tip. The equivalent of git checkout -- file. It takes exactly one repository-root-relative path — there is no glob form and no flags — and it rewrites no history.
The committed file mode is restored too, so an executable script comes back executable.
This is the one that loses work
Uncommitted edits are not in the op-log, because they were never an operation. tovio undo cannot bring them back. This is the main command in TOVIO capable of destroying something unrecoverably, and it is worth pausing before it.
The safer habit
Commit first, then undo. A commit is cheap, and once the edit is a change you can reverse it, split it, or abandon it — all reversibly.
tovio commit -m "wip"tovio undo # if you change your mindWhen it refuses
Under --json a success is {"restored": "<path>", "from": "<commit>"}.
Discarding a whole change instead
tovio change abandon <id>tovio change restore <id> # if you were wrongAbandoning sets a change aside: hidden from tovio change list and not landable, but nothing is deleted and its history is kept. change restore <id> brings it back.
Reversing something already landed
tovio revert <rev>tovio revert <merge> --mainline 1Writes a new change that inverts the named one, rather than removing it from history. For a merge you must say which parent's line to keep — which side to un-apply is a judgement, never a default.
Where to find it
restore is Advanced-tier, so it is hidden from the default tovio help index. It still runs — tovio help --all lists it, and tovio help restore prints its full help regardless of tier.