I would like to restore a file that I deleted within a commit. I tried
git checkout path/to/deleted/file
but got
error: pathspec 'path/to/deleted/file' did not match any file(s) known to git.
How can I restore a file deleted by my latest commit?