Stash
A temporary storage area for incomplete changes. It allows you to quickly set aside modified files without committing them, so you can work on something else.
What it is
Stashing takes your modified tracked files and staged changes and saves them on a stack of unfinished changes. You can safely switch branches or pull new updates, and then reapply the stashed changes to your working directory later.
When you would use it
You use stash when your current code is in a messy state that isn't ready for a commit, but you urgently need a clean working directory to handle another task.
Common operations
- Pausing current work to quickly switch to a hotfix branch.
- Stashing experimental changes to pull the latest remote code.
Related terms
Where this is taught
No learning path uses this term yet. Browse the Learning Atlas for guided sequences through related ideas.