How do I delete untracked local files from the current working tree?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Step 1 is to show what will be deleted by using the
-noption:Clean Step – beware: this will delete files:
git clean -f -dorgit clean -fdgit clean -f -Xorgit clean -fXgit clean -f -xorgit clean -fxNote the case difference on the
Xfor the two latter commands.If
clean.requireForceis set to "true" (the default) in your configuration, one needs to specify-fotherwise nothing will actually happen.Again see the
git-cleandocs for more information.