When I am trying to clean all untracked files by git clean
it shows me the error:
fatal: clean.requireForce defaults to true and neither -i, -n, nor -f given; refusing to clean
How to resolve it?
You have to either set requireForce
to false
in your .gitconfig
or use the -f
or -i
flag with this command.
git clean -f
will force to clean the untracked files even if clean.requireForce
is set to true which is default.git clean -i
will give you an interactive way for cleaning each filegit clean -n
will just show which files will be removed if you perform git clean.Reference: https://git-scm.com/docs/git-clean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With