Save and resume progress with git stash command git stash
Saving the current work progress will save the staging area and workspace changes. After executing this command, when you run the git status command, you will find that you are currently in a clean workspace with no changes. Use git stash save ‘message...‘ to add some comments
git stash List
Displays a list of saved progress. It also means that the git stash command can be executed multiple times.
git stash pop [–index] [stash_id]
git stash popRestores the latest progress to the workspace. git defaults to restoring workspace and staging area changes to the work area.
git stash pop --indexRestore the latest progress to the workspace and staging area. (Try to restore the original staging area changes to staging area)
git stash pop [email protected]{1}Restores the specified progress to the workspace. STASH_ID is git stash list obtained by command.
git stash popthe current progress is deleted after the progress is resumed with the command.
git stash apply [–index] [stash_id]
In addition to not deleting the progress of the recovery, the rest is the git stash pop same as the command.
git stash drop [stash_id]
Deletes the progress of a store. If you do not specify STASH_ID, the latest storage progress is deleted by default.
Git stash Clear
Deletes the progress of all the stores.
Source: CSDN Original: 73810577?utm_source=copy
Save and restore progress using the git stash command