(1)git stash 暂存当前分支中修改的内容
git stash
(2)git satsh 在暂存时加备注信息
git stash save 'fix bug'
(3)git satsh list 查看暂存的所有内容
git stash list

(4) 恢复最近1次暂存的内容(对应stash@{0}), 并从stash list中删除
git stash pop
(5) 恢复最近1次暂存的内容, 并将该内容在stash list中保留
git stash apply stash@{0}
# 或者恢复其他暂存的内容
git stash apply stash@{2}
(6) 查看某次stash中修改的内容
git stash show -p stash@{0}
本文主要介绍了Git Stash的相关使用方法,包括暂存当前分支中修改的内容、暂存时添加备注信息、查看暂存的所有内容,还提及了恢复暂存内容的不同方式,以及查看某次stash中修改内容的操作。
9325

被折叠的 条评论
为什么被折叠?



