[Tex/LaTex] compiled pdf +git : Check and update generated pdf on a git repository

git

(SOLVED)

Good morning,

I browsed the web in order to search if there is a way to check and commit an updated version of .pdf file compiled through LaTeX. But I don't find any solution.

This seems to be possible using something called "git pre-commit hook", do you have any idea how to do this.

Many thanks

Kosen

Ps: I'm on windows and using TeXmaker

————–edit 11/01/2016—————-

I had a *.pdf in my .gitignore file which explain why was not able to see any change to my .pdf file.
You can force a specific file to be tracked like that :

git add -f my_file.pdf

Then every time is modified, it will be notified in your git management tool.

Best Answer

You should not use version control for generated files, period.

git can store binary (non text) files, but it is quite bad at it. And asking for e.g. differences between binary files will just give gibberish, unless you go the extra mile to write a specialized "show differences in humanly understandable format". And without such, the whole point of having files under version control is moot. Or almost.

I.e., my lecture notes in LaTeX are under git's control. If I want to see differences between versions, they are apparent in the sources, not in the PDFs.