I have a version of a .tex
file from a number of commits ago that I would like to get a copy of. I have the sha1 hash value for the commit that has the version
Use git show
with absolute repository paths:
workdir$ git show revision:repo/module/package/code.file > code.file.old
or paths relative to the current directory:
package$ git show revision:./code.file > workdir/code.file.old
In contrast to checking out a file, show
does not intrinsically change your workspace, you can do anything you like with the output.
Credit to this answer, and of course see full details in the manual.