gitundo snapshots your entire working tree β staged, unstaged and
untracked β so reset --hard, clean -fdx, a bad rebase or an
accidental delete can never cost you hours of work. Zero dependencies. Any repo.
pip install gitundo
A safety net that lives where git already lives β ordinary commits on a hidden ref, protected by git's own integrity model.
Staged and unstaged and untracked files, deletions, symlinks, binaries. Ignored files & the stash are never captured.
Recover work destroyed by reset --hard, clean -fdx, checkout -f β even files that were never committed.
Snapshots automatically before destructive commands (reset --hard, clean -dfxβ¦). Installed with one command.
list, diff, and tag demo-ready β every intermediate state is findable and restorable by number, tag or id.
Only a hidden ref is ever written. The index, working tree and history stay exactly as you left them. Restore never rewrites history.
Official VS Code extension: sidebar checkpoints, one-click snapshot, restore & diff, and a live status bar.
Checkpoints are real git commits hanging off refs/gitundo/checkpoints β so deduplication, integrity and shareability are all handled by git itself.
gitundo snap "before the refactor" stores the complete working state as a lightweight checkpoint.
Experiment freely β or let the auto-guard snapshot for you before reset --hard, clean and friends.
gitundo restore (by number, tag or id) puts everything back. Local edits are kept aside as *.gitundo-keep, never clobbered.
Selectors everywhere: latest, a number (snapshots ago), a tag name, or an object-id prefix.
| Command | What it does |
|---|---|
gitundo snap [msg] [-t TAG] | Snapshot the current working state |
gitundo list | Browse checkpoints, newest first |
gitundo restore [SEL] | Restore the working tree to a checkpoint |
gitundo diff [SEL] | See exactly what a snapshot saved |
gitundo tag NAME [SEL] | Name a checkpoint β tagged ones survive pruning |
gitundo prune -k 50 | Keep the newest 50 + tagged; reclaim the rest |
gitundo autowrap | Install the shell auto-guard (bash / zsh) |
gitundo status | Guard state, recent checkpoints, storage used |
A π view in your Activity Bar listing every checkpoint, with one-click snapshot & restore, unified diffs, tags and a live status counter β all without touching your commits.
Activity Bar viewRestore & DiffStatus barTagsPython 3.9+ and any git. No other dependencies, no daemon, no config file required.
pip install gitundogitundo snap -m "hello world" && gitundo list