A Sublime Merge plugin that adds convenient stash functionality through context menus and command palette.
- Right-click to stash files in the summary view
- Right-click to stash hunks in the diff view
- Interactive hunk stashing - choose exactly which hunks to stash
- Command palette integration for quick stashing
- Multiple file types supported - works with modified, untracked, and staged files
-
Find your Sublime Merge packages directory:
- Windows:
%APPDATA%\Sublime Merge\Packages\User - macOS:
~/Library/Application Support/Sublime Merge/Packages/User - Linux:
~/.config/sublime-merge/Packages/User
- Windows:
-
Copy all
.sublime-menuand.sublime-commandsfiles from this repository into that directory -
Restart Sublime Merge to load the new menus
- Right-click any file in the Files tab → "Stash File"
- Works with modified, untracked, and staged files
- Right-click in any diff content → "Stash Hunk (Interactive)"
- Git will show each hunk and let you choose which ones to stash
- Type
yfor yes,nfor no,qto finish
Press Ctrl+P (or Cmd+P on macOS) and type:
- "Git: Stash All Changes" - Quick stash of all changes
- "Git: Stash Hunks (Interactive)" - Interactive hunk selection
- "Git: Stash Including Untracked" - Stash including untracked files
- "Git: Stash Staged Changes Only" - Stash only staged changes
Go to Repository → Stash All Changes or Stash Including Untracked
Modified File.sublime-menu- Context menu for modified filesUntracked File.sublime-menu- Context menu for untracked filesIndex File.sublime-menu- Context menu for staged filesDiff Context.sublime-menu- Context menu for diff content (includes hunk stashing)Hunk.sublime-menu- Context menu for hunk headersFile.sublime-menu- Context menu for file headersDefault.sublime-commands- Command palette entriesMain.sublime-menu- Main menu integration
The plugin uses these Git commands:
git stash push $path- Stash specific filegit stash push --patch $path- Interactive hunk stashinggit stash push --include-untracked- Stash including untracked filesgit stash push --staged- Stash only staged changes
Feel free to submit issues and pull requests!
MIT License - see LICENSE file for details