Branch by feature - Advantages/disadvantages?

MrW picture MrW · May 12, 2011 · Viewed 12.9k times · Source

I'm currently working in a project where branching and merging haven't been working very well at all from the start. In order to change this, we've been talking about loads of different ways to do it. I assume everyone have there own philosophy about how to do this kind of stuff, and so it seems to be here as well.

One thing we've been talking about is to branching by feature. We happen to have very different views at whats good and bad with this particular method.

Do you have experience of doing this before? Did it work well? Did you have issues - what kind of issues?

I know this question wont really have a correct answer, but I find it very interesting to hear the opinions of other developers around the world, and stackowerflow seems to be a great spot for that.

Answer

Scott Bruns picture Scott Bruns · May 12, 2011

We use branch by feature and it works very well for us. The biggest advantage is that the feature teams know that what they are working on does not affect the other feature teams until the new feature is integrated (into Main in our case).

When we are finished with a new feature (and the branch has been merged to Main) we move the branch into a Branch History folder. This keeps the numebr of branches (folders) the developers need to look at to a minumum.

In our case, no one works in the Main branch. All development is done in a feature branch. Initial development (before the first release to Production) is done in a development branch. After the first realease to Production all development is done in a new Feature Branch.