I've been practicing
git checkout -- somefile.txt
git checkout -- index.html
git checkout -- some/path is equivalent to
git checkout HEAD -- some/path. As with most commands, Git will default to
HEAD here which is a reference to the currently checked out branch.
So if you’re on
git checkout -- some/path will check out the file from the