Sometimes you start down a path, and realize that there is a better approach or you just don’t have the time to continue. In git it’s easy to do a

git checkout -- .

for all existing files, but more difficult for untracked files. To remove all untracked files try this:

rm -rf $(git ls-files --others --exclude-standard)