Git子模块与包管理器的私有源 [英] Git Sub Modules vs Private Sources for Package Managers
问题描述
使用本地包管理器(例如pip或npm)比使用git子模块有什么优势?
What are the advantages of using a local package manager (e.g pip or npm) than using git sub-modules ?
推荐答案
git
是开发工具;您可以在开发过程中使用它,但不能在部署过程中使用它. pip
是一种部署工具;在开发过程中,您可以使用它来安装必要的库;在部署过程中,您的用户使用它来安装具有相关性的软件包.
git
is a development tool; you use it during development but not deployment. pip
is a deployment tool; during development you use it to install necessary libraries; during deployment your users use it to install your package with dependencies.
在开发环境中需要远程存储库中的某些东西时,请使用子模块.例如,如果所述远程存储库包含您需要的Makefile或其他非python文件,而这些文件通常未与 pip
一起安装.
Use submodules when you need something from a remote repository in your development environment. For example, if said remote repository contains Makefile(s) or other non-python files that you need and that usually aren't installed with pip
.
这篇关于Git子模块与包管理器的私有源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!