Git branching model, what is the benefit of having a development branch?
Asked Answered
P

2

7

The following Git branching model seems to be quite widespread. http://nvie.com/posts/a-successful-git-branching-model/

In our current project we do not have a development branch and create feature/bugfix branches off of master and merge them back and tag all the relevant milestones (finished feature/bugfix/release).

So I'm wondering, what the benefits of having a development branch are?

Perambulate answered 27/6, 2013 at 11:52 Comment(2)
thanks, I was planning to ask the same thing :) -- I decided for the single-master model as yours but sit on the fence with that git-flowBlowy
maybe you will be interested in some counter-style workflow to nvie model where the development branch is actualy the master: speakerdeck.com/ewoodh2o/a-sane-git-workflowFeltie
R
6

My understanding is that the development branch is there to keep the master branch clean. In other words, the master branch should contain nothing but release-ready code.

Ravelment answered 27/6, 2013 at 12:0 Comment(0)
A
1

I have had many clients that did things like you as well. In your world, you might not need a development branch. I think you are using master like a development branch, which is fine for you, it seems.

Some organizations have high ceremony, however, and everything requires debate and approval. In those places, the development branch can function as a place where all working code comes together before being split off in to release branches and eventually to master. In the chart you showed, feature branches are where code lives before it is working. The development branch is where it goes once it's fit to associate with well-behaved code. From there, at some point a snapshot from development feeds the release branch, which might remain active for weeks or months while people hem and haw about QA cycles, final feature set, etc. Eventually the release branch is promoted to master, which represents production at all times.

Since your current setup is working for you, however, perhaps that's all you need. It certainly makes for a less cluttered world.

Anchor answered 27/6, 2013 at 12:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.