On this page
Kater CLI Undo a change
kater undo
Undoes one change, as a new change that reverses it.
Give the change’s id from kater history, or from the change that an agent’s write gives. History is never rewritten, and later edits to other lines of the same files stay.
Examples
# Go to a workspace in your local copy of Kater contentcd connections/snowflake_prod_connection/workspaces/ad_reporting# Find the id of the change to undokater history .# Undo the changekater undo ch_3f9a21c0d4e5# Bring the undo to your local copykater git pullArguments
Options
It also takes the global options --json and --help.
When Kater refuses
Kater refuses the undo, and says why, in these cases:
- A later change edited the same lines.
- A file that the change touched moved or was deleted since.
- You cannot edit every file that the change touched.
- The change touched more than 200 files.
- The change was undone already. To redo it, undo the change that undid it.
What it answers
It gives the new change’s summary and id, each file that it wrote, and the command that reverses it. --json gives undone, change, summary, files and redo.
- Redo. The undo is a change of its own, and History lists it. To redo, undo the undo:
redois the command that does it. - It compiles. An undo saves as every other save does, so Kater compiles the queries that it puts back.
- Agents ask first. An agent runs it with
kater_apply, so the agent’s host asks you first. - In your own terminal, it undoes the change in Kater, so it needs
kater login.kater git pullbrings the undo to your local copy.