πŸ›Ÿ The undo button git never had

Never lose work
to git again.

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
gitundo β€” you break it, it restores it

What you get

A safety net that lives where git already lives β€” ordinary commits on a hidden ref, protected by git's own integrity model.

Snapshot anything

Staged and unstaged and untracked files, deletions, symlinks, binaries. Ignored files & the stash are never captured.

Undo the un-undoable

Recover work destroyed by reset --hard, clean -fdx, checkout -f β€” even files that were never committed.

Auto-guard

Snapshots automatically before destructive commands (reset --hard, clean -dfx…). Installed with one command.

Browse & tag history

list, diff, and tag demo-ready β€” every intermediate state is findable and restorable by number, tag or id.

Zero-invasion

Only a hidden ref is ever written. The index, working tree and history stay exactly as you left them. Restore never rewrites history.

Editor integration

Official VS Code extension: sidebar checkpoints, one-click snapshot, restore & diff, and a live status bar.

How it works

Checkpoints are real git commits hanging off refs/gitundo/checkpoints β€” so deduplication, integrity and shareability are all handled by git itself.

Snap

gitundo snap "before the refactor" stores the complete working state as a lightweight checkpoint.

Break things

Experiment freely β€” or let the auto-guard snapshot for you before reset --hard, clean and friends.

Restore

gitundo restore (by number, tag or id) puts everything back. Local edits are kept aside as *.gitundo-keep, never clobbered.

Commands

Selectors everywhere: latest, a number (snapshots ago), a tag name, or an object-id prefix.

CommandWhat it does
gitundo snap [msg] [-t TAG]Snapshot the current working state
gitundo listBrowse 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 50Keep the newest 50 + tagged; reclaim the rest
gitundo autowrapInstall the shell auto-guard (bash / zsh)
gitundo statusGuard state, recent checkpoints, storage used

Made for your editor too

The GitUndo extension for VS Code

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 barTags

Install in seconds

Python 3.9+ and any git. No other dependencies, no daemon, no config file required.

pip install gitundo
gitundo snap -m "hello world" && gitundo list