Don't want to commit the half-done work in your own work directory, but need to pull new updates from remote or check out a branch.
Use git stash.
Stashing takes the dirty state of your working directory – that is, your modified tracked files and staged changes – and saves it on a stack of unfinished changes that you can reapply at any time.
Files in stage area and workspace tracked files will all be stashed when using "git stash".
But when you use "git stash apply", the staged files will not be in the stage area, you can use "git stash apply --index" to keep it in a staged area.