Just as a reminder, newer versions of git has the restore command, which also is a suggestion when typing git status when you have changed files:
(use "git add ..." to update what will be committed)
(use "git restore ..." to discard changes in working directory)
So git 'restore' is the modern solution to this. It is always a good idea to read the suggestions from git after typing 'git status' :-)