Sometimes git suggests git rm --cached to unstage a file, sometimes git reset HEAD file. When should I use which?
git rm --cached
git reset HEAD file
EDIT:
D:\
For versions 2.23 and above only,
Instead of these suggestions, you could use git restore --staged in order to unstage the file(s).
git restore --staged
unstage