Git 暂存命令 stash
git什么情况下要用到 暂存?
通常在我们再自己的独立分支开发过程中,需要同步拉取master代码前,先将自己自从最近一次提交后的所有修改暂存起来,然后切换到master拉取,然后把master合并到自己的开发分支,合并后,再把临时暂存的代码恢复回来。
git 代码暂存指令:
git stash
git 代码暂存列表信息:
git stash list
git 代码应用暂存代码:{记录id} 多条暂存可以通过暂存记录id指定应用那一条
git stash apply stash@{0}
git 代码清空暂存:
git stash clear