git: throwaway untracked files
how to clean up untracked files easily
How to remove local untracked files from the current Git branch
- To remove directories, run
git clean -f -d
orgit clean -fd
- To remove ignored files, run
git clean -f -X
orgit clean -fX
- To remove ignored and non-ignored files, run
git clean -f -x
orgit clean -fx
Source: https://koukia.ca/how-to-remove-local-untracked-files-from-the-current-git-branch-571c6ce9b6b1g