I write my PhD thesises in LaTeX. Now I try to use git to track my project. Can somebody advice me good workflow of this process? Is it good idea to track image files and resulting .pdf by git?
closed as off-topic by Troy, Stefan Pinnow, Phelype Oleinik, user36296, TeXnician Sep 6 '18 at 14:55
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question does not fall within the scope of TeX, LaTeX or related typesetting systems as defined in the help center." – Troy, Stefan Pinnow, Phelype Oleinik, user36296, TeXnician
I am currently in the same situation. Depending on the source of the images I consider two different options.
The image was obtained as a
pngor any other dead format. In this case, I track it in the repo since it is unlikekely to be modified. EDIT If the image was crated with
MatlabI also keep the source
figfile to keep the possibility to modify it later (which is still unlikely to happen).
The image was built from
pgf-tikzcode say with pure
metapostand others. In that case, I just track the source files (raw data + code) to be able to reproduce it from any computer. EDIT I however add auxiliary files to the
.gitignoreas they are not required.
Finally, a side note regarding styles. When you have a lot of figures using common settings created with
tikz, you can
style.tex file as a header for your figures, containing
This way you only have to change the definition of a given style in this file to change it in every picture, so the tracking of modifications is a bit easier.
What should be the problem? I'd just make sure that the
.gitignore will make sure that all those meta-files latex creates are not being uploaded to GitHub to keep a clean repository. As for images and PDFs there is no problem whatsoever with uploading them to GitHub. See here for a GitHub that hosts a LaTeX-document and some pictures.