Indeed, git reset --hard SHA1
won't remove the untracked files. It will just reset the HEAD
pointer to the SHA1/commit/branch specified, and overwrite the index and the working directory accordingly (changing there only the tracked files).
If you want to "clean up" your working directory in an automatic - but somewhat aggressive way, beware that the deletion of files cannot be canceled - a possible solution is to run:
git clean -d -x -n
# dry-run to inspect the untracked and ignored files
git clean -d -x -f
# to remove all these files
For more information on these commands, you can see e.g. the doc of git clean as well as the "Discussion" section of the doc of git reset.
Another solution if you want more flexibility, is to rely on git ls-files
to display the list of such files, and possibly chain this with a bash pipe. Below is one such example, which is inspired by this answer to "How can I see list of ignored files in git?":
git ls-files --exclude-standard --ignored --others | grep '\.patch$'
# to display the ignored or untracked files with .patch file-extension
git ls-files --exclude-standard --ignored --others | grep '\.patch$' | xargs rm -v
# to remove these files