My preferred way to reset a local git workspace to HEAD version. Untracked files and directories will be deleted too.
git add .
git reset --hard HEAD
The git reset --hard
call doesn’t remove untracked files/directories. As a workaround you have to stage all changes and untracked files/directoy first. Then the clean out via git reset --hard
resets all.