完成dev分支下的开发工作,准备切换到master分支的时候,报了个错
error: Your local changes to the following files would be overwritten by checkout:

天地良心!老子肯定把所有的改变都提交了,工作区是干净的,为什么会报这个错!

虽然还不知道明确的原因,但版本的状态可能有些乱,所以我找到的解决的办法就是用reset命令退回到当前版本:
git reset --hard HEAD
问题解决

参考资料
《Git asks me to commit or stash changes on checkout master, even though all changes were committed?》
4776

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



