📦 StashingCommonly used
How to stash changes in Git
Temporarily save uncommitted changes so you can switch context.
Stash current changes
git stashSaves all staged and unstaged changes and reverts to the last commit.
When to use: Quickly save work in progress to switch branches.
Stash with a description
git stash push -m "work in progress on login form"Stashes changes with a descriptive message for easy identification later.
When to use: When you have multiple stashes — descriptions help you find the right one.
Stash including untracked files
git stash -uAlso stashes new untracked files that haven't been added yet.
Stash specific files
git stash push -m "description" path/to/file.txtStashes only the specified file, leaving other changes intact.