当我尝试通过 git clean
清理所有未跟踪的文件时,它显示错误:
fatal: clean.requireForce defaults to true and neither -i, -n, nor -f given; refusing to clean
如何解决?
最佳答案
您必须在 .gitconfig
中将 requireForce
设置为 false
或使用 -f
或 -i
使用此命令进行标记。
git clean -f
将强制清理未跟踪的文件,即使clean.requireForce
设置为默认值 true。git clean -i
将为您提供一种交互式方式来清理每个文件git clean -n
将仅显示如果执行 git clean 将删除哪些文件。
关于git - fatal : clean. requireForce 默认为 true 且未给出 -i、-n 或 -f;拒绝打扫,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34542204/