Git提示Please move or remove them before you switch branches.

Posted 码莎拉蒂 .

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Git提示Please move or remove them before you switch branches.相关的知识,希望对你有一定的参考价值。

1 问题

git checkout V1

提示错误如下

error: The following untracked working tree files would be overwritten by checkout:
        flutter_module/pubspec.lock
Please move or remove them before you switch branches.
Aborting

 

 

 

 

 

 

 

2 解决办法

git clean -df ../flutter_module/pubspec.lock

然后再

git checkout V1

 

以上是关于Git提示Please move or remove them before you switch branches.的主要内容,如果未能解决你的问题,请参考以下文章

git冲突Please move or remove them before you can merge

git Please move or remove them before you can merge. 错误解决方案

Git---报错:git Please move or remove them before you can merge 解决方案

Git---报错:git Please move or remove them before you can merge 解决方案

Git日常使用问题报错Please move or remove them before you merge

Please move or remove them before you can merge