Git stash can be used to stage the current work, such as to pull the latest code, do not want to add a new commit, or another situation, in order to fix an urgent bug, first stash, so that return to their previous commit, change the bug after the stash pop, Continue the original work.
Basic command:
$git Stash
$do some work
$git Stash Pop
Advanced:
Git stash save "work on progress for Foo feature"
When you use the ' git stash ' command multiple times , your stack will be filled with uncommitted code, and you'll be confused about which version to apply back,
'git stash list' command can print the current git stack information, you just need to find the corresponding version number, for example, using 'git stash apply [email protected]{1} ' can you specify the version number of [ The work of email protected]{1} is taken out and when you apply all the stacks back, you can use 'git stash clear' to empty the stack.
git stash # Save uncommitted changes# Pull, edit, Etc.git stash list # list stashed changes in this gitgit show [E Mail protected]{0} # See the last stash git stash pops # Apply last stash and remove it from the Listgit stash--help
# for more info
Git Stash Staging current work