Nifty Undo Tree
Never lose an edit to undo again: every version of a file is kept in a tree, including branches you undid and typed over, with diffs and one-click restore.
Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.
Features


- Undo without fear. Normally, if you undo a few steps and then type something, the undone work is gone for good. Nifty Undo Tree keeps it. Every version of the file stays in a tree, including branches you undid and typed over.
- See your history. The Undo Tree view in the Explorer lists the active file's versions, newest first, with when each was made and how many lines changed. Places where you undid and started over show the abandoned branches underneath, one click away.
- Compare and restore. Click a version to compare it with the file as it is now. Click Restore to bring it back. A restore is a single edit, so plain Ctrl+Z takes you back again.
- Works with normal undo. Ctrl+Z and Ctrl+Y move through the tree as usual. Nothing about your editing changes; the extension only watches.
- Light. Edits made close together become one version (1 second by default), each file keeps at most 500 versions (abandoned branches are dropped first), and very large files are skipped.
- Works in the browser on vscode.dev and github.dev.
Commands
| Command |
What it does |
Nifty Undo Tree: Compare with Current |
Diff a version against the file now (click a version) |
Nifty Undo Tree: Restore This Version |
Put the file back to a version (inline button) |
Nifty Undo Tree: Clear History for This File |
Start the file's history again |
Settings
| Setting |
Default |
What it does |
nifty.undo-tree.groupMs |
1000 |
Edits this close together become one version |
nifty.undo-tree.maxStates |
500 |
Most versions kept per file |
nifty.undo-tree.maxFileSizeKB |
1024 |
Larger files aren't tracked |
nifty.undo-tree.excludeLanguages |
["log"] |
Languages not to track |
nifty.undo-tree.keepClosed |
true |
Keep a file's history after it's closed (until VS Code restarts) |
History is kept in memory for the session; nothing is written to disk.
Install
- VS Code: search for "Nifty Undo Tree" in the Extensions view, or install from the Visual Studio Marketplace.
- Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.
Privacy
This extension collects no telemetry and needs no account.
- Nifty Branches: Clean Up Merged Git Branches: Safely clean up merged, squash-merged, gone and stale git branches, with a preview and one-click restore. (Open VSX)
- Nifty Git Graph: Git History & Branch Graph: See your git history as a graph: branches, merges and tags, commit details and diffs, and checkout, merge, rebase, cherry-pick and more from a right-click. No sign-in. (Open VSX)
- Nifty Git: Git Client, Graph, Rebase & Worktrees: 14-day free trial, then $39 once. A Git client in VS Code: commit graph, drag-and-drop merge and rebase, interactive rebase, undo, worktrees. No account. (Open VSX)
- Nifty SVN: Subversion Source Control: Subversion in the Source Control view: changes, changelists, diffs, commit, update, blame and branches, in VS Code, Cursor and more. (Open VSX)
- Nifty .NET Explorer: Solution & Test Explorer: A solution explorer and test explorer for .NET in VS Code, Cursor, Windsurf and VSCodium: projects, references and files from .sln/.slnx, and xUnit, NUnit and MSTest tests in the Testing view. (Open VSX)
- Nifty Agent Config: AGENTS.md, Rules & MCP Files: See which AGENTS.md, CLAUDE.md, Cursor, Copilot, Windsurf and Gemini rules apply to the file you are editing. Lint rule and MCP files for hidden text, secrets and broken links, and keep them in sync. (Open VSX)
See all 100+ Nifty extensions and web tools at https://getnifty.dev
| |