I would like to restore some files in the working directory to the state of the latest commit on the current local branch, which is master, however, my attempts to use git checkout to achieve this have failed consistently.
I have confirmed that the following works:
git checkout HEAD src/graphql/User.ts
But I know that I should be able to use a wildcard in the pathspec, i.e. :
git checkout HEAD '*/User.ts'
However this fails.
How can I use a pathspec with a wildcard to restore a limited set of files to the state stored in the latest or previous commit?