When should pdf files be tracked in a Git repository and when not

前端 未结 3 1016
轻奢々
轻奢々 2021-01-04 02:07

I am developing a LateX package (http://www.openlilylib.org/lilyglyphs) which contains a number of small PDF files. Currently there are only a few dozens of them but as the

相关标签:
3条回答
  • 2021-01-04 02:41

    If the documents don't change, there is no reason to track their changes in git. No revisions, no need for revision control.

    But if they do change over time, and someone may need to consult the old document versions for any reason, consider these questions:

    1. Is it impossible or impractical to recreate the old versions of the documents?
    2. Is there any underlying data outside of version control that has changed, or is it still in the same state?
    3. Is the data in the documents tied to source code releases?

    If the answers to these questions are yes, then they may be good candidates for version control under git.

    0 讨论(0)
  • 2021-01-04 02:54

    I know this is an old post but I found it whilst searching so other people might as well. Here are some options I found

    As it has been pointed out, a lot will depend on whether these source files will change over time.

    One option you have if they don't change (or change infrequently) would be to keep a copy of them on a server you control or on a Cloud storage option and make your install script download them rather than produce them.

    This would probably depend on the user having wget or curl installed but most people do and if they don't, you could always prompt the user to download them manually.

    If the PDFs do change with the source frequently, you could look at GIT LFS. I have never used it myself but have seen it used.

    0 讨论(0)
  • 2021-01-04 02:59

    The question is: do you want to use git for source code management/tracking/syncing exclusively or do you want to use it for distribution as well? For smallish projects it simplifies things to do it that way, for big projects it bloats the repo.

    0 讨论(0)
提交回复
热议问题