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
(0)

相关推荐