Doc Snapshot — Local File Version Control Without Git

Undo anything, anytime. Take named snapshots of any file, compare diffs, and restore previous versions — no Git commit required.
Why You Need This
Git is great for code, but it falls short for:
- Config files in
.gitignore that change frequently
- Quick experiments you don't want to pollute your git history
- Backing up before a risky refactor ("let me try something real quick")
- Tracking
.env, settings.json, or other non-tracked files
Doc Snapshot fills that gap. It's lightweight local version control that works on any file, tracked or not.
How It Works
Open any file
│
▼
Press Ctrl+Shift+S → "Before refactor"
│
▼
Make changes... experiment... break things...
│
▼
┌────────────────────────────────────────┐
│ Doc Snapshot: List Snapshots │
│ │
│ myService.ts │
│ ● 2026-03-29 10:41 "Before refactor" │
│ ● 2026-03-28 15:22 "Working state" │
│ ● 2026-03-27 09:15 "Initial version" │
└────────────────────────────────────────┘
│
▼
Select snapshot → [Compare] or [Restore]
│
▼
VS Code diff viewer opens / file restored
Features
- Take snapshots with custom labels at any time
- Compare current file with any previous snapshot using VS Code's built-in diff viewer
- Compare two snapshots against each other
- Restore file content from any snapshot
- Auto-snapshot on save — never lose a version accidentally
- Configurable limits — set max snapshots per file to manage storage
- Bulk cleanup — clear snapshots per file or for the entire workspace
Quick Start
Install from VS Code:
- Open Extensions panel (
Ctrl+Shift+X)
- Search
Doc Snapshot miccho27
- Click Install
Or install via command line:
ext install miccho27.m27-doc-snapshot
Use:
- Open any file you want to snapshot
- Press
Ctrl+Shift+S to take a snapshot (name it something meaningful)
- Make your changes
- Run
Doc Snapshot: List Snapshots to compare or restore
Settings
| Setting |
Default |
Description |
docSnapshot.autoSnapshot |
false |
Auto-take snapshot on file save |
docSnapshot.maxSnapshotsPerFile |
50 |
Maximum snapshots stored per file |
Commands
| Command |
Shortcut |
Description |
Doc Snapshot: Take Snapshot |
Ctrl+Shift+S |
Save current file state with a label |
Doc Snapshot: List Snapshots |
— |
Browse all snapshots for the current file |
Doc Snapshot: Compare with Snapshot |
— |
Diff current file vs. a snapshot |
Doc Snapshot: Compare Two Snapshots |
— |
Diff two snapshots against each other |
Doc Snapshot: Restore Snapshot |
— |
Revert file to a saved snapshot |
Doc Snapshot: Delete Snapshot |
— |
Remove a specific snapshot |
Doc Snapshot: Clear All (File) |
— |
Remove all snapshots for the current file |
Doc Snapshot: Clear All (Workspace) |
— |
Remove all snapshots in the workspace |
Use Cases
- Before risky refactors: Snapshot before making large changes, restore if it goes wrong
- Config files: Track
.env, nginx.conf, or other files outside Git
- Experiments: Try different approaches without polluting your git history
- Document evolution: Track how a README or spec document changed over time
License
MIT
| |