git stash 用于暂存当前正在进行的工作,如想pull最新的代码,又不想加新的commit,或者为了fix一个紧急的bug,先stash,返回到自己上一个commit。

修改完bug后,再执行git stash pop,继续原来的工作。

 

使用流程:

1、git commit 自己要提交的文件

2、git stash  //压栈

3、git pull //获取服务器最新文件

4、git push //把修改的文件提交到服务器

5、git stash pop //解压栈

 

相关文章:

  • 2022-02-06
  • 2022-12-23
猜你喜欢
  • 2021-07-18
  • 2021-10-30
  • 2021-07-04
相关资源
相似解决方案