Remove untracked directories in addition to untracked files. If an untracked directory is managed by a different Git repository, it is not removed by default. Use the -f option twice if you really want to remove such a directory.
git clean -fd
You can then check if your files are really gone with git status.
-dRemove untracked directories in addition to untracked files. If anuntracked directory is managed by a different Git repository, it isnot removed by default. Use -f option twice if you really want toremove such a directory.
-f, --forceIf the Git configuration variable clean.requireForce is not set tofalse, git clean will refuse to delete files or directories unlessgiven -f, -n or -i. Git will refuse to delete directories with .gitsub directory or file unless a second -f is given. This affectsalso git submodules where the storage area of the removed submoduleunder .git/modules/ is not removed until -f is given twice.
-xDon't use the standard ignore rules read from .gitignore (perdirectory) and $GIT_DIR/info/exclude, but do still use the ignorerules given with -e options. This allows removing all untrackedfiles, including build products. This can be used (possibly inconjunction with git reset) to create a pristine working directoryto test a clean build.