[Tex/LaTex] How expensive is it to add pdfs in git?

git

I'm thinking to use git for my latex projects, and I'm wondering whether I should add the pdf output to the repositories, or leave it out. It would be sort of convenient to have it in there, but I'm worried that it would quickly use up lots of space, assuming that git basically will have to save each version in its entirety, as they are binary, or is there a reasonable way of having only small diffs?

Best Answer

Don't. as a general rule of thumb, you should not commit generated files but only corresponding sources.

Check for example this source from Michael Ernst for details (quote):

Version control is intended for files that people edit. Generated files should not be committed to version control. For example, do not commit binary files that result from compilation, such as .o files or .class files. Also do not commit .pdf files that are generated from a text formatting application; as a rule, you should only commit the source files from which the .pdf files are generated.