I was looking for a way to include the Git revision numbers to my $\rm \LaTeX$ files and found Brent Longborough’s gitinfo package which is available on CTAN. Here’s the definition from
gitinfopackage provides to allow version control metadata to be incorporated into documents. The metadata is obtained from the git distributed version control system.
I followed the setup steps explained in the documentation but faced a problem during the setup. I realized that in order to succesfully create the
gitHeadinfo.gin, the files created in the hooks folder must be executables.
The steps I followed are as follows:
- I added the
gitinfopackage using Tex Live.
- I copied the ﬁle
post-mergeinto the git hooks directory in my working folder.
- Since I have more than one folder in my working directory (gitinfotest) I edited the files by adding
prefixes=”folder1 folder2”and deleting
prefixes=”.”. This is how my working folder looks like;
- I made the files executables by running
chmod 755 post-checkout, etc. This is how hooks folder looks like;
You can find detailed package information and commands in the documentation,