The git stash command can be use to save changes, without committing them.
Useful when switching branch, but having unfinished changes on another.
You can have as many stash entry as you want.
never checked), include them with -u
git stash or git stash -u
git stash pop
Note:
popapply the last stash entry and delete it.
| command | action |
|---|---|
| git stash apply | apply the last stash entry but does not delete it (as oppose to pop) |
| git stash list | list all the available stash entry |
| git stash apply stash@{n} | apply the nth stash (get the number with stash list) |
| git stash drop stash@{n} | delete the nth stash |
| git stash clear | clear all the stash |