How do you store third party libraries in your source control?

后端 未结 15 1570
太阳男子
太阳男子 2020-12-13 03:19

How do you store third party libraries that you use in your project in your source control?

When would you store binaries in your source control?

When would

15条回答
  •  爱一瞬间的悲伤
    2020-12-13 03:43

    If you are using git (which I recommend), and you have the source of the third party library, then storing the library in its own git repository and including it as a submodule is an excellent setup.

    • http://book.git-scm.com/5_submodules.html
    • http://git-scm.com/docs/git-submodule

    If the source library is also using git then you can clone their library and push it to your own server so you'll never lose it.

    Git submodules allow you to specify which revision of a library is required for a project, which is great for maintaining compatibility.

提交回复
热议问题