Removing untracked files from your git working copy
If you want to also remove directories, run
git clean -f -d
.
If you just want to remove ignored files, run
git clean -f -X
.
If you want to remove ignored as well as non-ignored files, run
git clean -f -x
.