In git, we can use git show commitlike:filepath
to show a file as it was at a particular revision, and using shell redirection we can retrieve that version and put it back in the working tree somewhere: git show commitlike:filepath > otherpath
.
Is there a single git command to perform the latter task? git checkout commitlike -- filename
can retrieve the file but only put it in its original location.