Usually, to discard changes to a file you would do:
git checkout --
What if the change I want to discard is deleting the file?
As of git v2.23, you have another option:
git restore --staged -- <file>