分开开发和部署git仓库 [英] Separate development and deployment git repositories
问题描述
- 保持部署历史记录清洁(无开发人员提交)
- 对部署存储库的访问受到限制(没有开发人员可以按照他们无法访问部署存储库的方式进行主管和破解)
- 所有依赖项都在部署存储库中。这降低了在不同的部署阶段运行保险杠安装或类似依赖管理员的风险,并获得不同的结果。
有什么好处和
主要好处是保留可交付的工件(可以很大,可以包含二进制文件)与源代码回购分开。
- 主要的repo仍然是一个仅来源的repo(意思是文本内容,没有或少数和小的二进制文件)
- 交付回购:
- 独立管理
- 不必完全克隆(一个浅克隆就足够了,因为该功能最近已经改进了) a>)
- 可以根据需要进行清理(修改旧的交货已过时)
- Keep the deployment history clean ( No developer commits )
- Limited access to deployment repository ( No developer can push to master and break things as they do not have access to the deployment repository )
- All the dependencies are in the deployment repository. This reduces the risk of running bower install or similar dependency managers at different stages of deployment and getting different results.
- the main repo remains a source-only repo (meaning text content, no -- or few and small -- binaries)
- the delivery repo:
- is managed independently,
- doesn't have to be cloned completely (a shallow clone can be enough, since that feature has been improved recently)
- can be "cleanup" if necessary (trimming old deliveries now obsolete)
主要的不便之处(两者兼有方法)是将二进制文件保留在git repo中(这不适合这样的工件)。
替代存在(使用git): git-annex,bup,... 。
或者您可以将这些可交付成果存储在专用参考中,如 Nexus(不同于git repo )
I recently came across an approach of managing a project and its deliverable. Project team was using git repository for development. There was another repository being used for deploying artifacts. I can see several benefits with this approach.
What are the benefits and disadvantages of this approach in your opinion ?
The main benefit is to keep deliverable artifacts (which can be large and can include binaries) separate from the source repo.
The main inconvenient (for both approaches) is to keep binaries in a git repo (which isn't a good fit for such artifacts).
Alternatives exist (using git): git-annex, bup, ....
Or you can store those deliverable in a dedicated referential, like Nexus (which is different from a git repo)
这篇关于分开开发和部署git仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!