Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
I'm not familiar with Latex, but it seems the PDFs are generated from the Latex files. It then seems the real problem is that you are trying to keep source and objects derived from that source in ...
Answer
#1: Initial revision
I'm not familiar with Latex, but it seems the PDFs are generated from the Latex files. It then seems the real problem is that you are trying to keep source and objects derived from that source in the GIT repository. Ideally, a GIT repository is only for the actual source files (those directly edited by humans). Put the files that are automatically derived from source elsewhere. This can be automated with your build scripts putting derived objects in a different place. That different place could be a subdirectory within the repository that is added to the .gitignore list. Another possibility is to have a cleaner script that you run before each commit. This script would delete all the derived objects. Yet another possibility, although I really don't like this one, is to have the cleaner script instead edit the .gitignore file to ignore the known derived objects, based on the existence of particular source files.