开发者

Managing PDFs/binaries with Git or other VCS

I'm working on a LaTeX project at the moment f开发者_开发问答or a "thesis" of sorts, and I figured it would be a safe idea to track the work-in-progress with Git, as it's probably the nicest version-control system I've come across. Now, Git will handle source code files brilliantly, but how well does it handle binary files?

I'm unsure as to whether to track my generated PDFs as well as the *.tex sources. Even though I can regenerate my PDFs from any revision/branch, this can be time-consuming, and it's usually quicker to just bring up the relevant PDF version; will Git handle this? Is there a way to flag explicit versions within a Git repository, and can I set it up so, for example, I can quickly compare the PDF output of today's version with last week's?

Rolling back to a specific branch will overwrite the PDFs, or at the very least, require a recompile; I just want to be able to log my progress and efficiently store it, and in the process be able to back up my work. Git might be my solution, but are there better ones?

EDIT My brother sent me a link to some documentation on tagging, so that solves the versioning part of my question.


I think the best solution will depend on how you are going to use the VCS. If you are going to be frequently doing diffs between PDFs, git probably isn't a great solution.

If you are going to be doing diffs on the LaTeX source and then just glancing at the associated PDFs, git is probably a great choice. The way I'd do this is to use the "bisect" functionality to do a kind of pseudo-diff. Bisect is normally used to do a binary search on the revision history to find a bug. The way it works in bzr, you can give a command to run on each revision that will tell bzr if the bug was present. Just give the two revs you want to view and make evince the command to run.

Personally, I'd be more inclined to only control the actual sources. If your PDFs are taking a long time to compile, fix that problem separately. Are you generating all the PDFs each time you change any source file? Maybe a makefile could solve that?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜