Restore a single file in Git

Restore a single file to the last saved version in Git. This is useful if you have made changes to a file and want to revert it to the state it was in at the last commit.

git checkout -- path/to/your/file.php