特牛生活网

解决git分支切换时遇到的问题_please commit your changes or stash them before yo-CSDN博客

网友收藏
文章浏览阅读2.5k次。Please commit your changes or stash them before you switch branches问题的解决在项目开发的过程中,有时候会遇到一个分支上的BUG还没解决,另一个分支上的BUG又急需解决。这个时候如果没有提交当前分支上的修改的话,是没有办法切换分支的。遇到这类问题要怎么解决呢?首先使用 git branch 命令查看一下我的分支,可以看到目前是在 feat/demo-zky 分支上:使用 git diff 命令发现本地代码有改动,使用 git sta_please commit your changes or stash them before you switch branches