Documentation
Saves, undo and restore
Onset saves on its own. Undo any command, restore any file, or roll a whole project back.
Onset saves your work on its own and keeps enough to take back anything you did.
Saves
- Every
oncommand saves first. Between commands, a background saver saves a workspace within a few seconds of a file changing. - Saves stay on your machine first, then upload in the background. On the host, only you and your agents can see them, unless you share the change.
- Ignored files, from
.gitignore, are never saved and never land. - Every landed version is kept, and so is every save of an open change. Saves of a change that landed or was dropped are removed after 30 days.
on log --saves lists the current change's saves. ONSET_SAVER=0 turns the background saver off.
Undo
on undo undoes the last on command in the workspace. Run it again to go further back. on log --ops lists what it walks through.
| Undoing | Does |
|---|---|
| land | Adds a version to main that takes the change back out, and reopens the change in this workspace. |
| sync | Puts the change and the files back as they were. |
| new, switch | Goes back to the previous change and its files. |
| drop | Brings the change back. |
| describe, access | Puts the old description or rule back. |
| restore | Puts the files back as they were. |
on undo <version> takes an older landed version back out of main without undoing anything else. Its change opens again, so nothing is lost. If later versions changed the same lines, undo stops and says so.
get, init, import, publish and login aren't undone.
Restore
on restore src/app.ts # as it was before your change
on restore src/app.ts --at "10 min ago" # from your own earlier save
on restore src/app.ts --from 48100 # from a version of main
on restore . # everything
A restore is saved too, so on undo reverses it.
Look back
| Command | Shows |
|---|---|
on log | Recent versions of main. |
on log <path> | The versions that changed a file or folder, followed through moves. |
on log --changes | Open changes you can see. |
on blame <file> | The version that last changed each line. |
on show <file> --from <version> | A file as it was. |
on diff | What your change changes. |
on bisect <good> <bad> --run "<command>" | The first version of main where a command fails. |
Roll back a project
Owners can put a whole hosted project back as it was at any time in the last 30 days:
on rollback --to "2h ago"
It prints a bookmark, and on rollback --undo <bookmark> reverses it.
Take a file out of history
For a secret or a huge file that should never have landed:
on purge config/keys.json # says what it would do
on purge config/keys.json --yes # does it
This removes the file from every version, change and save, and deletes its content. It's for owners, it can't be undone, and it rewrites the Git view's main. A leaked secret still has to be changed.
Check for damage
on check reads every object on your machine against its ID and asks the host to check its copy of the project. Damaged objects on your machine are fetched again from the host.