# Save with a message describing WHY
git stash push -m "WIP: fixing the cancel button"
# Stash only specific files
git stash push -m "frontend tweaks" -- src/components/Button.tsx
# Include untracked files (default skips them)
git stash push -u -m "scratch experiment"
# List with messages visible
git stash list
# stash@{0}: On feature-branch: WIP: fixing the cancel button
# stash@{1}: On main: scratch experiment
# Inspect a stash without applying
git stash show -p stash@{1}
# Apply by message (no need to remember the index)
git stash apply "$(git stash list | grep 'fixing the cancel' | awk -F: '{print $1}')"
Create a free account and build your private vault. Share publicly whenever you want.