0

I want to be able to choose the right branching strategy for most thinkable situations and organizations. So I'm looking for a extensive list of positive and negative effects of extending the use of code repository branches in a development organization.

Please only post one pro or one con in each post, so that the voting system can help rank the feedback somewhat.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
sharkin
  • 12,162
  • 24
  • 86
  • 122
  • You can't format the responses this way. People should answer however they choose too, and then others will comment on it, so there is a dialog. Rather than limiting people in how much they can say. – DevinB May 13 '09 at 12:29
  • People can say how much they want about a certain pro or con. I just want to prevent ambiguity. I think the subject matter should be ranked, rather than a certain person's comprised view of pros and cons. – sharkin May 13 '09 at 12:38

11 Answers11

4

Pro: By keeping latest deployed version in trunk, small fixes can be rolled out quickly without extensive testing of the latest development version.

Stefan Lundström
  • 1,262
  • 11
  • 12
3

Pro: Developers can work more freely in tighter iterations without stepping on eachother's feet.

sharkin
  • 12,162
  • 24
  • 86
  • 122
3

Pro: if you have many branches you'll be pushed to adopt a modern DVCS (my experience is with Mercurial but I hear git or Bazaar are also good) rather than stay with a traditional centralized system (like, say, svn).

Alex Martelli
  • 854,459
  • 170
  • 1,222
  • 1,395
3

Pro: Branches can be used to facilitate 'what-if' scenario's in trying out new code. At the end a decision can be made to merge the new feature or to abandon it.

Sardaukar
  • 29,034
  • 5
  • 26
  • 32
2

Con (and it can be a big one): Merging back at a point in the future. The longer the duration and the greater the deviation of code base, the harder your life will be. My advice: think very carefully about branching and ensure you only do it when necessary and consider the effort involved in merging at a later date should it be required.

Troy Hunt
  • 20,345
  • 13
  • 96
  • 151
2

Con: Having too many branches in the air at the same time and you start forgetting where things where commited, where changes have been made etc.

Stefan Lundström
  • 1,262
  • 11
  • 12
1

Con: Merge nightmare.

mouviciel
  • 66,855
  • 13
  • 106
  • 140
  • Yes, if using underperforming tools like Sourcesafe, TFS or Subversion. Less so with a DVCS like git or Mercurial. – Sardaukar May 13 '09 at 12:07
0

Con: Greater learning threshold for junior developers.

sharkin
  • 12,162
  • 24
  • 86
  • 122
0

Pro: Each update is independant from the others, so work can be parallelized.

mouviciel
  • 66,855
  • 13
  • 106
  • 140
0

Con: someone has to manage the branch(es) and keep on top of things. In most teams this falls by the way-side.

Alex
  • 8,093
  • 6
  • 49
  • 79
0

Pro: Greater flexibility in diverging code for the purpose of simultaneously developing on or supporting multiple streams of work.

Troy Hunt
  • 20,345
  • 13
  • 96
  • 151