Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best branching strategy when doing continuous integration?

What is the best branching strategy to use when you want to do continuous integration?

  1. Release Branching: develop on trunk, keep a branch for each release.
  2. Feature Branching: develop each feature in a separate branch, only merge once stable.

Does it make sense to use both of these strategies together? As in, you branch for each release but you also branch for large features? Does one of these strategies mesh better with continuous integration? Would using continuous integration even make sense when using an unstable trunk?

like image 769
KingNestor Avatar asked Feb 28 '09 07:02

KingNestor


People also ask

What is the best branching strategy?

Git Flow is the most widely known branching strategy that takes a multi-branch approach to manage the source code. This approach consists of two main branches that live throughout the development lifecycle.

What is CI CD branching strategy?

Put simply, a branching strategy is your team's agreement on how and when to create and merge branches in version control. How you set up your version control system and use branches will impact how you set up your CI/CD pipeline, so it's important to choose a model that meets your needs.

Which one is the best branching Git workflow to follow?

Git Flow. The Git Flow is the most known workflow on this list. It was created by Vincent Driessen in 2010 and it is based in two main branches with infinite lifetime: master — this branch contains production code.


1 Answers

I find the topic really interesting since I heavily rely on branches on my daily job.

  • I remember Mark Shuttleworth proposing a model about keeping the main branch pristine while going beyond conventional CI. I posted about it here.
  • Since I'm familiar with Cruise Control, I also blogged about task branches and CI here. It's an step by step tutorial explaning how to do it with Plastic SCM.
  • Finally, I found some of the topics about CI (and potentially talking about branching) at Duvall's book on CI very interesting too.

Hope you find the links interesting.

like image 120
pablo Avatar answered Oct 11 '22 22:10

pablo