Does it make sense to use source control to manage graphics files (e.g. PSDs & AI files)

前端 未结 6 1823
我寻月下人不归
我寻月下人不归 2021-02-19 10:46

Of course source control tools like Git, (Mercurial, SVN, etc...) can do a great job at managing source code. But I wonder, do these tools provide the developer with any advanta

6条回答
  •  误落风尘
    2021-02-19 11:13

    Those answering "no" have very good reasons, but it isn't impossible.

    I'm successfully using GitHub to manage an open source project consisting of hundreds of Illustrator files and PDFs (and also some code and text, but that's a tiny blip in comparison). The repo comes out at about 8GB. The reason I'm doing something so insane is because the Illustrator files are the core of the product, not merely decorative artwork to go along with it - they are the source of the project - and because I wanted to make sure it would stay open source.

    There have been some sticking points, and things to be aware of. I would suggest:

    • Don't try this unless you're pretty familiar with git. Resolving conflicts and branching issues can get really thorny, and you may have to do some pretty arcane stuff to keep the repo happy. Nobody expects you to know every corner of git (I'm not sure a sane person could), but know enough that you can google the rest.

    • Make sure you're comfortable using git on the command line. GUI tools may shield you from complexity, but they also prevent you from fully understanding what's going on under the covers. Once you have that understanding, you're free to use a GUI for 95% of the time.

    • Avoid branching if possible. Binary files don't merge the way code does, so bringing branches together can get messy and laborious.

    • Learn about specific features of git that can help you to manage the size and complexity of the repo: partial checkouts, tags, git gc, etc

    • Take time to plan in advance. It may be that you would benefit from separating the project into two or more git repos, or from combining it with another service.

    • If you're using a hosting service, make sure you know what limits they impose on the repo. For example, GitHub will complain about files over 100MB. Here are their recommended guidelines for binaries.

提交回复
热议问题