Git: How to fully clean a working directory


Just a note to self on how to fully clean a git working directory.

I have some tricky projects where I'm currently located, and sometimes things get messed up and IntelliJ doesn't know what to do with them anymore...

The following will clear everything out, and allow for a clean re-import:

git clean -f -x -d
Also remove ignored files
Also remove directories