When should you branch?

后端 未结 12 1467
情深已故
情深已故 2020-11-22 04:24

When working with a SCM system, when should you branch?

12条回答
  •  遇见更好的自我
    2020-11-22 04:57

    It depends on what type of SCM you're using.

    In the newer distributed versions (like git and mercurial), you're creating branches all the time and remerging anyway. I'll often work on a separate branch for a while just because someone's broken the build on the mainline, or because the network's down, and then merge changes back in later when it's fixed, and it's so easy to do that it's not even annoying.

    The document (short and readable) that most helped me understand what was going in in the distributed systems is: UnderstandingMercurial.

    In the older systems with a central repository, (like CVS, SVN and ClearCase), then it's a much more serious issue which needs to be decided at a team level, and the answer should be more like 'to maintain an old release whilst allowing development to continue on the main line', or 'as part of a major experiment'.

    The distributed model is much better, I think, and lacking only nice graphical tools to become the dominant paradigm. However it's not as widely understood, and the concepts are different, so it can be confusing for new users.

提交回复
热议问题