Have a git repo with a bunch of junk you want to clean up? Want to get back to a pristine checkout state?
This protip is for you!
git clean cleans up "junk" files/directories:
git clean -xfd
-f to clean up files,
-x to clean up ignored files, and
-d to clean up directories.)
git checkout to get your files back to their committed state:
git checkout -- .
Run this from the root of your repo (note the
. in the above command, this means "current directory", but you can use any path you need as appropriate.