Remove unstaged changes in all tracked files.
git checkout -- .
Remove unstaged changes in one file.
git checkout -- [filepath]
If file is staged but no commited remove it with:
git reset HEAD [filepath]
To clean untracked files. Check what will be deleted:
git clean -n
Then to apply changes:
git clean -f