Skip to main content
gx shelf is a friendlier interface for git stash. It lets you push stashes with descriptive names, browse them interactively with file stats, and apply/pop/drop with a simple number+action interface.

Usage

Subcommands

gx shelf (interactive)

Opens an interactive stash browser showing each entry with its index, age, message, originating branch, and file change stats:
Actions use the stash index number followed by an action letter:
Entering just a number (e.g., 0) defaults to apply. You only need the action letter for pop or drop.

gx shelf push [message]

Stash your current changes with a descriptive message:
If no message is provided, gx generates one with the branch name and timestamp:

gx shelf list

Non-interactive list of all stashes with their details:

gx shelf clear

Drop all stashes at once:
gx shelf clear permanently deletes all stashes. This cannot be undone. Use --dry-run to preview first.
  • If the working tree is clean, gx shelf push prints > Nothing to stash. Working tree is clean.
  • With -u, gx also checks for untracked files before saying “nothing to stash”
  • The interactive picker supports text filtering by message content or branch name (case-insensitive)
  • Drop requires a separate confirmation prompt (Drop stash@{n}? [y/N])
  • File stats (insertions/deletions) are parsed from git stash show --shortstat