1、暂存
git add xxx
git stash # 只会暂存已经 add(tracked)的内容,因此最好先 add
git stash save '暂存的名称' # 指定暂存的名称
2、查看所有暂存
git stash list
3、恢复暂存
(1)指定暂存号恢复,并从 list 中删除
git stash pop stash@{index}
(2)指定暂存号恢复,但不从 list 中删除(建议)
git stash apply stash@{index} #
4、删除暂存
git stash drop stash@{index} # 删除指定暂存
git stash clear # 删除全部暂存