使用Git进行版本更新时,经常会遇到如标题的错误:
> git pull
Updating bb0e8f1
error: The following untracked working tree files would be overwritten by merge:
解决方法也很简单,直接在当前项目所在目录执行如下命令:
git clean -d -fx ""
各个参数的具体含义如下:
x -----删除忽略文件已经对
git来说不识别的文件
d -----删除未被添加到git的路径中的文件
f -----强制运行
然后再执行更新命令,便可以正常操作了:
> git pull