Travel through your code history without Git. Visual Code Time Machine is a VS Code extension that automatically captures every change in your workspace, allowing you to jump back to any point in time with a single click.
- Real-time monitoring - Tracks every file edit, save, creation, and deletion
- Smart throttling - Captures changes after 3 seconds of inactivity or on save
- Complete workspace snapshots - Stores the entire state of your project at each point in time
- No Git required - Works independently of version control systems
- Jump to any point - Click any snapshot to restore your workspace to that exact moment
- File restoration - Files created after a snapshot are automatically removed when jumping back
- Deleted file recovery - Files deleted after a snapshot are automatically restored when jumping back
- Perfect accuracy - Every file is exactly as it was at that moment in time
- Search by description - Find snapshots by typing keywords
- Time period filters - Quick filters for Today, Yesterday, This Week, This Month, or All Time
- Live statistics - See total snapshots and currently visible count at a glance
- Real-time filtering - Results update instantly as you type
- Content-addressable storage - Uses SHA-256 hashing like Git
- Automatic deduplication - Identical files are stored only once
- Efficient disk usage - Only unique content is saved, saving significant space
- Local storage - Everything stored in
.history_machinefolder
- View files - See exactly which files existed in any snapshot
- Export snapshots - Extract any point in time to a separate folder
- Clear history - Remove all snapshots with a single click
- Timeline visualization - Beautiful timeline view with relative timestamps
Option 1: VS Code Marketplace
Install from VS Code Marketplace
Option 2: Command Line
code --install-extension MuhammadEhsaan.visual-code-time-machineOption 3: VS Code Quick Open
- Press
Ctrl+P(orCmd+Pon Mac) - Type
ext install MuhammadEhsaan.visual-code-time-machine - Press Enter
- Open any folder/workspace in VS Code
- Look for the โฐ Time Machine panel in the Explorer sidebar
- Start coding - snapshots are captured automatically!
- Click any snapshot to jump back in time
Visual Code Time Machine captures snapshots in these scenarios:
- On typing - After 3 seconds of inactivity
- On save - Immediately when you save a file (
Ctrl+S) - On file creation - When you create new files or folders
- On file deletion - When you delete files or folders
your-workspace/
โโโ .history_machine/
โ โโโ blobs/ # Content storage (deduplicated)
โ โ โโโ abc123def... # File content by hash
โ โ โโโ 456789ghi...
โ โโโ manifest.json # Timeline index
โโโ src/
โโโ package.json
โโโ ... (your files)
When you jump to a snapshot:
- Scan current state - Identifies all current files
- Load snapshot state - Retrieves files from that point in time
- Remove future files - Deletes files that didn't exist yet
- Restore past files - Recreates files that were deleted later
- Update content - Overwrites all files with their historical versions
You're working on a feature and make several changes across multiple files.
Suddenly you realize you want to go back to before you started.
1. Open Time Machine panel
2. Find the snapshot from before you started (e.g., "30m ago")
3. Click "Jump Here"
4. Your workspace is instantly restored!
You accidentally delete an important file and save the changes.
1. Open Time Machine panel
2. Click "This Week" to filter recent snapshots
3. Find a snapshot from before the deletion
4. Click "Jump Here"
5. The deleted file is automatically restored!
You want to see what files existed at different points in your project.
1. Open Time Machine panel
2. Click "View Files" on any snapshot
3. A new panel opens showing all files at that moment
4. Use the search box to find specific files
5. Compare with current state
You want to extract a working version from 2 days ago.
1. Open Time Machine panel
2. Click "Yesterday" or search for the specific time
3. Click "Export" on the desired snapshot
4. Choose a folder location
5. Complete workspace state is exported!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โฐ Time Machine โ
โ Navigate your code history โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Total: 45 Showing: 45 โ โ Statistics
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ Search โ
โ [Filter by description...] โ
โ โ
โ โก Time Period โ
โ [Today] [Yesterday] [Week] โ
โ [Month] [All Time] [Clear] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ [โป Refresh] [๐๏ธ Clear] โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Timeline:
โโ 5m ago โ Latest (Current State)
โ File saved
โ ๐ 15 files [View] [Jump]
โ
โโ 23m ago
โ Document changed
โ ๐ 15 files [View] [Jump]
โ
โโ 1h ago
โ Files created
โ ๐ 14 files [View] [Jump]
Each snapshot has three actions:
- View Files - Opens a panel showing all files in that snapshot
- Export - Exports the snapshot to a folder
- โฎ๏ธ Jump Here - Restores your workspace to this snapshot
Access these via Command Palette (Ctrl+Shift+P or Cmd+Shift+P):
Code Time Machine: Revert to Snapshot- Jump to a specific snapshotCode Time Machine: Clear History- Delete all snapshotsCode Time Machine: Export Snapshot- Export a snapshot to a folderCode Time Machine: View Snapshot Files- View files in a snapshot
By default, these folders are excluded from snapshots:
.history_machine/(the extension's storage)node_modules/.git/
All snapshots are stored in .history_machine/ in your workspace root.
Important: Add .history_machine/ to your .gitignore if you're using Git:
echo ".history_machine/" >> .gitignore- Use quick filters - Fast way to find recent changes
- Export important snapshots - Create backups of working states
- Search descriptions - Find specific changes quickly
- Review before jumping - Click "View Files" to see what will change
- Clear old history - Periodically clean up to save disk space
- Don't rely solely on Time Machine - Still use proper version control (Git) for team projects
- Don't track large files - The extension stores complete file contents
- Don't delete
.history_machine- You'll lose all your history - Don't jump during unsaved work - Save your work first to avoid losing changes
Problem: Changes aren't being captured
Solutions:
- Ensure you have a workspace/folder open (not just individual files)
- Check that the file is in the workspace (not an external file)
- Verify the extension is activated (check status bar or extension list)
Problem: After jumping to a snapshot, the timeline appears empty
Solutions:
- Click the "Refresh" button in the timeline
- Close and reopen the Time Machine panel
- Restart VS Code if the issue persists
Problem: .history_machine folder is taking too much space
Solutions:
- Click "Clear All" to remove old snapshots
- Exclude large files/folders from your workspace
- Export important snapshots then clear history
Problem: Error when trying to jump to a snapshot
Solutions:
- Ensure no files are currently being edited
- Close all open editors
- Check that
.history_machinefolder exists and is readable - Try refreshing the timeline
- Local only - All data stays on your machine
- No cloud sync - Nothing is sent to external servers
- No telemetry - The extension doesn't track or report usage
- Full control - You can delete all history anytime
- Language: TypeScript
- Storage: File-based with content-addressable blobs
- Hashing: SHA-256 for content deduplication
- UI: WebView-based sidebar with VS Code theme integration
- Throttling: 3-second debounce on typing changes
- Deduplication: Identical files stored only once
- Lazy loading: Snapshots loaded on-demand
- Async operations: Non-blocking capture and restoration
- VS Code: Version 1.75.0 or higher
- OS: Windows, macOS, Linux
- Node.js: Built-in with VS Code
fs-extra- Enhanced file system operationsdiff- Content diffing for change detection
Contributions are welcome! Please read our Contributing Guide for details on:
- ๐ How to report bugs
- ๐ก How to suggest features
- ๐ ๏ธ Development setup
- ๐ Code style guidelines
- ๐ Pull request process
- โจ Automatic snapshot capture on changes
- โฎ๏ธ Time travel to any snapshot
- ๐ Search and filter capabilities
- ๐ธ View files in snapshots
- ๐พ Export snapshots to folders
- ๐จ Professional timeline UI
- ๐ Live statistics and counters
MIT License - see LICENSE file for details
- Built with โค๏ธ for the VS Code community
- Inspired by the need for local, Git-independent version control
- Thanks to all contributors and users for feedback
- Issues: GitHub Issues
- Email: ehsaan2611@gmail.com
Made with โค๏ธ by Muhammad Ehsaan | GitHub | LinkedIn | Website
"Because sometimes you need to go back in time without Git."