你有多远版本控制? [英] How far do you take version control?

查看:163
本文介绍了你有多远版本控制?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近磁盘便宜的理论已经有些失控。版本控制有一些强大的方面,使我们能够使用一些引导文件和一个简单的命令将新工具链拖到新开发人员面前。

最近系统的升级提示存储构建的二进制文件的请求。随后请求对整个虚拟化版本系统进行版本升级。在顶部添加的每个图层都会创建存储库之间的重要关系,并且需要一个良好的基本设计来管理它。

工具链的存储为构建二进制文件存储即时负债带来了即时优势。不幸的是,在处理大型二进制文件时,Git有一些基本问题。



你在哪里以正确的方式使用VC画线,何时开始研究更合适的解决方案?

解决方案

您可能不应该将整个虚拟化构建系统存储为巨型二进制文件。如果您想为您的应用程序进行版本化,则需要对源代码进行版本化,而不是编译后的二进制版本。



许多商店在版本控制中存储 em>重新创建构建服务器。然后你需要一个固定的图像(一个股票,现成的操作系统安装),再加上少量的文件(如何安装,以及如何)。一些地方甚至让他们的服务器从源代码重建应用程序,在干净的操作系统安装,每个部署/重新启动。



版本操作系统镜像本身作为一个巨大的二进制isn'几乎是有用的。你不能分支。你不能合并。你不能区分。重点是什么?如果您的VCS可以执行二进制比较,那么您可以节省空间,但这可能需要大量的CPU和内存才能完成,如果它们在磁盘便宜的情况下狂欢,那么没有理由让生活变得痛苦而仅仅为了节省磁盘空间。



将安装脚本/库存储在VC中,并根据需要重新构建VM映像,或者将VM映像存储在普通文件中。我没有看到将图像放入VCS中的任何问题。


The theory that "disk" is cheap has gotten a bit out of hand lately. There are some powerful aspects of version control that have enabled us to onboard new developers with a few bootstrap files and one simple command to pull the toolchain over.

Recently upgrades to the systems have prompted requests for storing built binaries. This has been followed on by a request to version the entire virtualized build system. Each layer added on top creates important relationships between repositories and a good fundamental design is necessary to manage it.

The storing of the toolchain brought instant benefit while the storing of the built binaries brough instant liabilities. Git, unfortunately, has some fundamental issues when dealing with large binary files.

Where do you draw the lines at using VC in the right ways and when do you start investigating more appropriate solutions?

解决方案

You probably shouldn't be storing the "entire virtualized build system" as a giant binary. If you want to version your application, you version the source code, not the compiled binary.

What many shops do is store in version control the steps to recreate the build server. Then you need one fixed image (a stock, out-of-the-box OS install), plus a small number of files (what to install on it, and how). Some places even have their server rebuild the app from source, on a clean OS install, for every deploy/reboot.

Versioning the OS image itself as a giant binary isn't nearly as useful. You can't branch. You can't merge. You can't diff. What's the point? You might save space if your VCS can do binary diffs, but that probably takes a ton of CPU and memory to do, and if they're on a "disk is cheap" binge, then there's no reason to make life painful just to save disk space.

Either store your install scripts/libraries in VC and rebuild the VM image as needed, or just store VM images in normal files. I don't see any point in putting the images in VCS.

这篇关于你有多远版本控制?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆