[Swan-dev] a different git branching model for Libreswan

D. Hugh Redelmeier hugh at mimosa.com
Wed Oct 29 19:24:05 EET 2014


Current model, as I understand it:
==================================

master is where everything goes.

We make releases off the HEAD of master.

When we wish to make a release, we freeze master to some extent, until 
the release can happen.  Only things "important enough" break through the 
freeze.  The freeze can go on for weeks because must-have features (eg. 
bug fixes) seem to drag on.


What I don't like:

We seem to be in perpetual freeze, with constant temptation to violate it.  
The longer the freeze has gone on, the more backlog and confusion builds 
up.


My first solution: personal branches
====================================

Create a personal branch, work there, and merge into master when the 
freeze has been removed AND my branch is in a good state.

Problems;

My private branch works against collaboration.

Other folks on the project don't really understand my view of what my 
branch is.  

My branches last too long, diverge too much, and are not shared well.
They don't get exercised and merging creates a big bang.


My suggested solution: release/freeze branches
==============================================

We should never freeze master.

When we want a freeze for a release, create a release branch.

Work continues on master.

If something should be in the release (eg. a bug fix), it should be
created in master but cherry-picked into the release branch.

If a kludge is needed in the release branch, it can be done there
without messing up master.

There can still be feature branches, but they should branch from
master and be merged into it.


Alternative solutions
=====================

This is not a new problem.  Many projects have created models that
address it.  We could adopt them.

<http://nvie.com/posts/a-successful-git-branching-model/>
In this one, master is sacred and seems to only include final
releases.

There is a branch for each release.  It branches from "develop".  Only
bug fixes are added.  When ready, it gets merged into master.

"develop" is roughly what I proposed for "master".

This would be fine as far as I'm concerned.  I prefer master to be
where development life is lived in an open-source project.


There are probably better models.  Suggestions?


More information about the Swan-dev mailing list