Today, I’ve been trying out various Yeoman generators to kickstart a web app coding challenge. After manually deleting the generated files from the first generator I tested, I took a moment to look up a command that would quickly remove all of the untracked files in my working directory.
git clean -di
not only removes the untracked files [leaving the repo’s README.md
untouched], but the -d
flag also deletes untracked directories, while the -i
flag does it all in interactive mode; it lists the files to be removed before asking me how to proceed. Easy peasy!