git报错:Please move or remove them before you can switch branches.

来源:互联网 发布:sub在vb中是什么意思 编辑:程序博客网 时间:2024/05/16 08:45
error: Your local changes to the following files would be overwritten by checkout:...省略中间部分.Please move or remove them before you can switch branches.

出现这个错误时:可以通过以下的命令处理:

git clean  -d  -fx ""

注:
1. x :表示删除忽略文件已经对git来说不识别的文件
2. d: 删除未被添加到git的路径中的文件
3. f: 强制执行

0 0
原创粉丝点击