Bash
Public
Reset One File to Last Commit
Discard local changes from one file and restore the committed version.
#git
#restore
#file
#undo
Bash
git restore path/to/file.php
Notes
Be careful: this removes local changes from that file.