源代码管理 - 锁定与合并? [英] Source Control - Lock vs. Merge?

查看:28
本文介绍了源代码管理 - 锁定与合并?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

许多使用 Visual Studio 的程序员很难适应这样一个事实,即在其他源代码控制系统中,文件在任何时候都不需要锁定/检出给一个开发人员.

A lot of programmers who are used Visual Studio have a hard time adjusting to the fact that in other source control systems, files do not need to be locked/checked out to one developer at any given time.

合并的支持者说,允许两个人处理同一个文件可以提高生产力,因为它消除了为同一个源文件排队.它还避免了需要编写代码但将源代码签出给刚休完两周假期的人的情况.

Proponents of merging say that allowing two people to work on the same file speeds up productivity since it eliminates queuing up for the same source file. It also avoids cases where code needs to be written but the source is checked out to a guy who just left on a two-week vacation.

锁定支持者说,当多人同时处理同一个文件时,会带来很大的风险.据他们说,当使用合并模型时,团队成员之间的沟通和协调变得更加必要.此外,很多人似乎不信任自动合并.

Locking advocates say that a lot of risk is introduced when more than one person works on the same file simultaneously. Communication and coordination between team members becomes much more necessary when using the merge model, according to them. Plus, a lot of people seem to mistrust automated merges.

让您使用一种方法而不是另一种方法的最令人信服的理由是什么?

What is the most compelling reason for you to use one method over the other?

推荐答案

从锁定模型切换到合并模型后,我将进行以下观察:

Having switched from locked model to merge model, I will make the following observations:

  • 大多数合并用户倾向于与他们正在开发的分支的头部"版本保持相当接近.这通常意味着戏剧性的合并问题并不常见.
  • 在 10 年左右的合并模型使用中,我只遇到过几个非常糟糕的合并问题.在这两种情况下,这是因为 2 个人解决了相同的问题.
  • 我们通常在不与另一方沟通的情况下解决合并问题;)
  • 锁定"模型 VC 如果系统处于稳定的维护阶段,几乎没有变化.
  • 如果你的团队很小(我会说 1-2 人;)

恕我直言合并模型非常优越,因为它允许我在处理代码时自由.对于 1 周的代码,它可能不是变暗"的最佳模型,但是对于锁定"模型,这同样是一个大问题.没有人会在一周内对代码感到困惑.

IMHO merge model is vastly superior because it allows me freedom while working with code. It may not be the best model for "going dark" with the code for 1 week, but then again with "lock" model this is an equally big problem. No-one shold go dark with code for a week.

这篇关于源代码管理 - 锁定与合并?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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