I have many TeX files for to get their PDFs versions and I put a date in each of them like as last updated data.
\usepackage[yyyymmdd]{datetime}
updated \today
But this is tricky, because every time that I compile them, this date would change in function of the day that I do it. So, because I track my changes with Git I want to change the \today command with the last date when the file was commited; and a file could be commited or not in the last change.
I use TeXLive distribution on Windows and I have a make.bat file for an automatic compilation of the files:
@echo off
for %%G in ("*.tex") DO (call :singlefile "%%G")
goto :eof
:singlefile
echo compiling %1
latexmk -xelatex -bibtex- -silent -auxdir=output -outdir=output %1
goto :eof
My Git version: 1.9.4.msysgit.0
gitinfopackage and its recent successor,gitinfo2? I don't know the specifics, but I'd say they're your best chance. – jub0bs Aug 08 '14 at 18:02gitinfois now deprecated for new work, and is kept on CTAN and in the distributions so that existing documents don't break. If you decide to use this, please usegitinfo2. – Brent.Longborough Aug 08 '14 at 21:53