A VS Code extension that mimics JetBrains' shelve functionality, allowing you to temporarily save uncommitted changes without creating a commit.
- Shelve Changes: Save your current uncommitted changes to a named shelve
- Shelve Selected Files: Shelve only specific files from your working directory
- Unshelve Changes: Apply shelved changes back to your working directory
- Partial Unshelve: Unshelve only selected files from a shelve
- Shelve Management: View, rename, and delete your shelves
- Shelve Details: View detailed information about what's in each shelve
- Tree View: Convenient tree view in the Source Control panel
This extension uses Git's stash functionality under the hood but provides a more user-friendly interface similar to JetBrains IDEs. Each shelve is stored as a Git stash with metadata stored in .vscode/shelves/ directory.
-
Shelve All Changes:
- Click the "Create Shelve" button in the Shelves tree view
- Or use the Command Palette:
Shelve: Create Shelve
-
Shelve Selected Files:
- In the Source Control view, right-click on changed files
- Select "Shelve Selected Files"
- View Shelves: All shelves appear in the "Shelves" tree view in the Source Control panel
- Unshelve: Right-click on a shelve and select "Unshelve All"
- Unshelve Selected Files: Right-click on a shelve and select "Unshelve Selected Files"
- View Details: Right-click on a shelve and select "Show Shelve Details"
- Rename: Right-click on a shelve and select "Rename Shelve"
- Delete: Right-click on a shelve and select "Delete Shelve"
Expand any shelve in the tree view to see the list of files it contains, along with their modification status (added, modified, deleted, renamed).
shelve.autoRefresh: Automatically refresh shelves when files change (default: true)shelve.showFileCount: Show file count in shelve items (default: true)
- VS Code 1.74.0 or higher
- Git must be installed and available in PATH
- Workspace must be a Git repository
- Clone this repository
- Run
npm install - Run
npm run compile - Run
npm run packageto create the VSIX file - Install the VSIX file in VS Code
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch
# Package extension
npm run package- Only works with Git repositories
- Shelves are stored locally and not synchronized across machines
- Binary files in shelves may not be handled perfectly
Feel free to submit issues and pull requests!
MIT