Question: When should I consider branching?

- J.D. Meier, Jason Taylor, Alex Mackman, Prashant Bansode

Answer

Branches enable multiple developers to work on the same files in isolation. Because merging incurs overhead and requires you to manage conflicts, you should not branch unless you need the file isolation that branching provides. You can label a build and branch later if needed.

The decision whether to create a branch can be summarized as follows: will the cost of merging conflicts in real time be higher, or will the overhead cost of merging conflicts between branches be higher?

Common reasons to branch include:
  • Release – Branch for builds you want to maintain, or branch for multiple releases in parallel.
  • Maintenance – Branch to maintain a previously released build.
  • Feature – Isolate work on experimental or risky features that might make the rest of the project unstable. Isolate work on interface changes that will cause instability for the rest of the project.
  • Team – Isolate sub-teams so that they can work without being subject to breaking changes from other teams. Isolate sub-teams so they can work toward unique milestones. These are very similar to feature branches.

Additional Resources

Last edited Jul 18, 2007 at 11:06 PM by jtaylorsi, version 7

Comments

No comments yet.