git pull origin master 报错

 

error: The following untracked working tree files would be overwritten by merge:
        Application/Runtime/Logs/Admin/20_02_26.log
        Application/Runtime/Logs/Common/20_02_26.log
Please move or remove them before you can merge.
Aborting
 

解决办法是:git clean -f 后面跟上报错的文件删除,就可以了

 

相关命令:

git clean -f -n:查看会删除哪些文件

git clean -f:删除上一条命令显示出来的文件

git clean -fd:删除文件夹

git clean -fX:删除已被忽略的文件

git clean -fx:删除已被忽略和未被忽略的文件