An interactive terminal UI for managing git stashes with live diff preview.
- Browse stashes with a live diff preview panel
- Rich syntax-highlighted diffs
- Apply, pop, drop, or rename stashes with a single keypress
- Search/filter stashes by name
- Configurable default action for Enter key
./install.shThe installer will:
- Install fzf for the interactive interface
- Install delta for rich syntax-highlighted diffs
- Create a
gsmcommand you can run from anywhere
After installation, restart your shell or open a new terminal.
- Open Git Bash and run
./install.sh - Restart your shell
- Run
gsmfrom Git Bash
For PowerShell, add this function to your $PROFILE:
function gsm { & bash 'path/to/git-stash-manager.sh' $args }Run gsm inside any git repository:
gsm| Key | Action |
|---|---|
a |
Apply stash |
p |
Pop stash (apply + remove) |
d |
Drop stash (delete) |
r |
Rename stash |
v |
View full diff in pager |
/ |
Search/filter stashes |
Esc |
Exit search mode |
q |
Quit |
Use arrow keys to navigate between stashes. The diff preview updates automatically.
On first run, you'll be prompted to choose a default action for the Enter key (apply, view, or pop). This preference is saved to ~/.config/git-stash-manager/config.
The interactive UI requires fzf version 0.45.0 or later. Without it (or with an older version), a fallback numbered menu is used instead.
Install or upgrade fzf:
# macOS
brew install fzf
# or upgrade: brew upgrade fzf
# Debian/Ubuntu
sudo apt install fzf
# Arch
sudo pacman -S fzfCheck your fzf version with fzf --version.
Rich diff highlighting requires delta. Without it, diffs display in plain text.
Install delta manually:
# macOS
brew install git-delta
# Debian/Ubuntu
sudo apt install git-delta
# Arch
sudo pacman -S git-deltaContributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Commit your changes
- Push to your branch and open a Pull Request
Please ensure your code follows the existing style and includes appropriate error handling.
This project is licensed under the GNU General Public License v3.0.