Git
Stash Commands
Git stash is your safety net for switching contexts. Learn to save work-in-progress, apply stashes selectively, and manage your stash list to maintain a clean workflow.
12 commands
Pro Tips
Use 'git stash push -m "description"' to name your stashes - makes finding them later much easier.
Use 'git stash -k' (--keep-index) to stash only unstaged changes while keeping staged files.
Consider 'git stash apply' over 'git stash pop' - it applies without deleting, safer if conflicts occur.
Common Mistakes
Stashes are local only and can be lost if you reset or delete your repo. Don't use stash for long-term storage.
The stash is a stack - 'git stash pop' removes the most recent stash, which might not be what you want.