git stash
command
Temporarily saves uncommitted changes so you can switch branches without committing.
Syntax
git stash [push | pop | list | drop]
Example
bash
git stash # stash current changes
git stash push -m "WIP: login form"
git stash list # show all stashes
git stash pop # apply and drop latest stash
git stash apply stash@{2} # apply specific stash
git stash drop stash@{0} # delete specific stash
git stash clear # delete all stashes