Stash management - save, pop, list, and drop stashed changes
clear subcommand is destructive — permanently deletes all stashesstash@{N} format where N is a non-negative integer. Reject arbitrary strings, shell metacharacters, or null bytes.save, pop, apply, list, show, drop, clear accepted.Save, restore, list, and manage stashed changes.
/git-stash # Stash all changes (default)
/git-stash save "message" # Stash with descriptive message
/git-stash pop # Apply and remove most recent stash
/git-stash apply # Apply stash but keep it
/git-stash list # List all stashes
/git-stash show # Show changes in most recent stash
/git-stash show stash@{2} # Show changes in specific stash
/git-stash drop # Delete most recent stash
/git-stash drop stash@{2} # Delete specific stash
/git-stash clear # Delete all stashes (use with caution)
# Check if there are changes to stash
if git diff --quiet && git diff --cached --quiet; then
echo "No changes to stash."
exit 0
fi
# Show what will be stashed
git status --short
# Stash with automatic message
git stash push -m "WIP on $(git branch --show-current): $(date '+%Y-%m-%d %H:%M')"
# Or with custom message
git stash push -m "Custom message here"
# Include untracked files
git stash push -u -m "Including untracked files"
# Include everything (even ignored files)
git stash push -a -m "Including all files"
# Apply most recent and remove from stash list
git stash pop
# Apply specific stash
git stash pop stash@{2}
# Apply but keep in stash list (useful for applying to multiple branches)
git stash apply
# Apply specific stash
git stash apply stash@{1}
# List all stashes with details
git stash list --format="%gd: %s (%cr)"
# Show diff of most recent stash
git stash show -p
# Show specific stash
git stash show -p stash@{2}
# Show just file names
git stash show --name-only
# Remove most recent stash
git stash drop
# Remove specific stash
git stash drop stash@{2}
# Clear all stashes
git stash clear
Stashed changes on feat/dark-mode
Changes stashed:
M src/components/Theme.tsx
M src/hooks/useTheme.ts
A src/styles/dark.css
Stash saved as: stash@{0}
Message: "WIP on feat/dark-mode: 2025-01-25 10:30"
To restore: /git-stash pop
Your stashes:
stash@{0}: WIP on feat/dark-mode: toggle component (2 hours ago)
stash@{1}: WIP on main: experimental changes (1 day ago)
stash@{2}: WIP on feat/auth: login form backup (3 days ago)
Total: 3 stashes
Commands:
/git-stash pop # Apply stash@{0}
/git-stash show stash@{1} # View stash contents
/git-stash drop stash@{2} # Delete specific stash
Applied stash@{0} to feat/dark-mode
Restored changes:
M src/components/Theme.tsx
M src/hooks/useTheme.ts
A src/styles/dark.css
Stash removed from list.
Conflict while applying stash!
Conflicting files:
- src/components/Theme.tsx
The stash was NOT dropped.
Options:
/git-conflicts # Resolve conflicts
git stash drop # Drop stash after resolving
git checkout --theirs . # Keep current, discard stash
git checkout --ours . # Keep stash, discard current
git stash push -m "descriptive message" makes stashes easier to manage-u flag to include new filesapply if you might need the stash again# Quick save before switching branches
/git-stash save "before switching to main"
/git-switch main
# Pull updates then restore
/git-stash
/git-pull
/git-stash pop
# Move changes to a new branch
/git-stash
/git-branch feat/new-feature
/git-switch feat/new-feature
/git-stash pop
/git-pull if you have uncommitted changes/git-switch to safely change branches/git-stash pop after operations completeSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer