五年前,我们强调了 Gitflow 长期分支 的问题。从本质上讲,长期分支与将所有更改持续集成到源代码中的方法背道而驰。并且,根据我们的经验,持续集成对大多数软件开发来说是更好的方法。后来,因为看到不少团队几乎只用长期分支,我们将警惕的态度扩大到 Gitflow 本身。时至今日,我们依然能看到以 Web 系统持续交付为既定目标的团队沉迷于长期分支。因此当看到 Gitflow 的作者现在已经在他的中添加了一条注释,解释说 Gitflow 当初不是为此类场景而设计时,我们非常高兴。
Gitflow is a strict branching pattern for releases using Git. Although not an inherently bad pattern, we often see it misused. If the feature and develop branches are short lived and merged often, you are really using the power of Git, which makes these activities easy. However, a problem we often see is that these become long lived branches , which results in the dreaded merge conflicts many people began using Git to escape. A merge is a merge. Regardless of the source control tool or pattern you use. If you wait more than a day or two to merge, you could hit a big merge conflict. This becomes a real issue if you have a larger team. If you have more than a few people waiting to merge, you can have a serious a bottleneck. Introducing patterns like Gitflow require the discipline to merge often to be successful. So by all means use the pattern, but only if you have the discipline to prevent long lived branches