Reset, restore and clean
The three commands that destroy the most work, and what GitAegis captures before each.

The classification, first
| Operation | Risk | Captured first |
|---|---|---|
| Reset --soft, --mixed | caution | Light checkpoint: refs, HEAD, index, patches |
| Reset --hard | destructive | Standard capsule, untracked files included |
| Restore --staged | safe | Nothing |
| Restore the working tree | caution | Light checkpoint: refs, HEAD, index, patches |
| Clean | destructive | Standard capsule, untracked files included |
| Discard (file, hunk or lines) | destructive | Standard capsule, untracked files included |

Reset
Each mode is labelled with what it does to the index and to the working tree, in plain words, and the plan computes the consequences rather than describing the flag. It walks your current tip against every other ref and lists (by oid and subject) the commits that would stop being reachable. For a hard reset it additionally enumerates every file with uncommitted changes that is about to be overwritten, and gives you the count in the summary.
A hard reset also states what it does not touch: untracked files stay on disk. And it offers two alternatives, one of them marked as the recommendation: revert the commits instead, which is safe for shared history because nothing becomes unreachable, or move the tip to a new branch first so the commits keep a name.
Where the branch has an upstream, the plan closes with the remote arithmetic: how far ahead and behind you will be afterwards, and the reminder that publishing a rewritten tip needs a force push, which is a separate previewed operation.
Restore
Restoring the index alone is safe. Index and worktree are reset from HEAD for those paths and nothing uncommitted is lost. Restoring the working tree discards uncommitted work on the paths you named, so it is caution, the plan lists every path it will overwrite, and the discarded content is preserved in the checkpoint’s patches. The rollback step is literal: re-apply the discarded changes from the checkpoint patch.
Clean
Clean is always destructive, because it deletes files that exist nowhere else. The plan enumerates them: every untracked file it will remove, and separately the count of ignored files, with the summary saying whether those are included or kept.
# untracked files and directoriesgit clean -f -d# only when you explicitly include ignored filesgit clean -f -d -x
The standard capsule taken first includes the untracked archive, which is what makes the rollback step real: restore the deleted files from the checkpoint’s untracked archive.
What the capsule holds, and where it stops
A standard capsule captures refs, HEAD, the reflogs, the binary index, staged and working patches, Git’s in-progress operation state, a sanitised copy of the local config as evidence, an archive of your untracked files, and a bundle. Every entry is checksummed with SHA-256, and a restore re-verifies all of them before it applies anything.
Two size limits, recorded rather than hidden
A single untracked file larger than 32 MiB, or any path that would push the archive past 128 MiB in total, is skipped, and the skip is written into the capsule’s manifest so you can see what was left out instead of discovering it during a restore.
These three commands cannot be cancelled mid-run
Reset, restore and clean are dispatched as non-cancellable steps. Once Git has the command, the app does not pretend it can stop it; the capsule taken beforehand is the recovery path, not a cancel button.