kule rollback
Throw the task's uncommitted changes away.
Synopsis
kule rollback [OPTIONS] <TASK>
Description
kule rollback puts the task's copy back to match the workspace as of the
last commit or sync. Everything the agent, kule exec or you changed in the
copy since then is gone: created files are removed, modified and deleted
ones come back, moves are undone, and git changes in the copy's .git are
reverted.
The workspace is not touched; there is nothing to take out of it, since uncommitted changes never reached it.
Steps start over. The task itself stays, ready for the next run.
Use it when you do not like the work, or after trying something you do not trust in kule exec. To take back changes that were already committed, use kule undo instead.
A rollback cannot be undone. If part of the work is worth keeping, commit
that first, or copy it out of the copy (kule path TASK).
Writes caught in the task's home layer are not part of a rollback; use
kule home discard for those.
Arguments
| Name | Required | Meaning |
|---|---|---|
TASK | yes | The task's full id. See Naming a task. |
Options
| Option | Value | Default | Meaning |
|---|---|---|---|
--home | path | ~/.kule | Kule's home (also KULE_HOME). See global options. |
Examples
Throw the work away:
$ kule status 3efe1ca8
2 file changes: +1 ~0 -1
- README.md
- section App
+ scratch.txt
policy: passes on its own
$ kule rollback 3efe1ca8
rolled back 2 changes
$ kule status 3efe1ca8
no changes
Try an installer, then forget it:
kule exec 3422f830 -- sh ./install.sh
kule status 3422f830
kule rollback 3422f830
Nothing to roll back:
$ kule rollback 3efe1ca8
rolled back 0 changes
Output
rolled back N changes, where N counts every path put back, including
those inside moved folders and .git.
Errors and fixes
| Message | What to do |
|---|---|
kule: an agent is at work in task <id> … | Wait for the run to end, or stop it. |
kule: task <id> is busy: another kule command holds its lock | Wait for the other command. |
In the app
Roll back under Review (Mod+Shift+Backspace, press twice). See Review.