Skip to content

Undo

saturn undo # the most recent ship
saturn undo 2 # the one before it, as numbered by `saturn who`

saturn undo shows what it would take back and asks first. When nobody is there to answer, it prints the command that goes ahead, such as saturn undo 3df61b7 --yes: the id names that exact ship, so the right one is taken back even if a teammate ships in the meantime.

--yes skips the question only when the command says what to take back, by number or id. On its own, saturn undo --yes behaves just like saturn undo, because the same words would otherwise back out of a clash at one moment and take a teammate’s ship back at the next.

Running saturn undo a second time puts the ship straight back.

Undo adds a change that reverses the ship; it never rewrites history. The undone work goes back to its branch, unshipped, so saturn who lists it and its author can fix it and ship again. For a pull request merged on GitHub, that is the branch the pull request came from. If the work could not be put there, undo says so.

What the author saved after shipping is work of its own and does not go back with it. The next save of that work takes the undo in: lines that both changed are reported as a clash, and files the undone ship added leave the folder, though they are still on the undone work’s branch.

Work whose ship is taken back holds no files until its author saves it again.

  • If newer work has since changed the same lines, undo refuses and says which files. Fix it with a new piece of work instead.
  • The project’s first commit cannot be undone.

undo takes back a whole ship for everyone. To put one file back as it was, for you, until you ship it, use Bring back in the window.

A released build has an undo of its own: saturn undo --release live.