Use Git Clean Remove Changes and New Directories

Doesn’t actually clean yet, just tells you what would be cleaned:

git clean -n

For real, delete any files not committed to your repository

git clean -f 

To remove directories, run

git clean -fd

To remove ignored files, run

git clean -fX

To remove ignored and non-ignored files, run

git clean -fx