I'm using Git for version control. Now I want to delete on my local machine all files in the repository that are not tracked.
I can use
git status
to list these files, but how can I delete all of them?
git
I'm using Git for version control. Now I want to delete on my local machine all files in the repository that are not tracked.
I can use
git status
to list these files, but how can I delete all of them?
Best Answer
If you have it in ignore, use
git clean -xf
. You can dogit clean -df
but that will also remove un-tracked directories. Use-n
for a dry-run.See cleaning up un-tracked