git暂存操作


git stash暂存当前分支修改代码,未ADD的不能添加
git stash pop恢复
git stash list列表
git stash pop 和 git stash apply 的不同:

apply 读取暂存区的数据,通过apply后,暂存区的数据依然存在。
pop 是取出最新的一次暂存数据,pop后,暂存区就不会存在这次数据了。

git stash #可用来暂存当前正在进行中的工作
git stash pop #从git栈中恢复第一个。相当于git stash apply 和git stash drop
git stash list #打印git栈中的所有信息
git stash clear #清空git栈
git stash apply stash@{1} #将你指定版本号为stash@{1}的工作取出
git stash show -p stash@{1} #查看某个stash详细信息
git stash drop stash@{0} #删除某个stash

posted @ 2021-05-27 15:45  咸菜白饭  阅读(5)  评论(0)    收藏  举报