git stash staging operations

People development, often encountered when developing a particular branch, to deal with other things, then you can stash your work at hand, other work, get away after the resumption, continue to work.

View current status

git status

If there are changes, add, modify files

git add .

Staging the

git stash save '本次暂存的标识名字'

View Record

git stash list

Restoration work designated staging, staging, record-keeping in the list, remove the need to restore the list by index index

git stash pop stash@{index}   apply命令恢复,恢复后,暂存区域会保留当前的记录

Restoration work designated staging, staging, record-keeping in the list, remove the need to restore the list by index index

git stash apply stash@{index}

To remove a scratch, scratch records stored in the list, need to be removed through the list index index recovery

git stash drop stash@{index}

Remove all the temporary

git stash clear
Published 146 original articles · won praise 66 · views 50000 +

Guess you like

Origin blog.csdn.net/qq_38923792/article/details/103205586