The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Branching the code?

Hi, I've heard the term branching the code used every once in a while but could someone please clarify what the term "to branch code" means?
Anthony Gerrard Send private email
Tuesday, June 26, 2007
This is a good explanation:
John Topley Send private email
Tuesday, June 26, 2007
While the link has a good detailed view, a simple explanation would be like the following.

Any application consists of one or more (sometimes many, sometimes a HUGE number) of files.

Now, when you have an "identified version" of the code, to build that "identified version" requires the set of source files.

As Erik says, having released a 1.0 version of the code, you'll now want a 1.01 version for patch fixes, as well as a 2.0 version for the next full release. 

So, you'll 'branch' the code set.  Before version control systems, you'd actually copy a complete set of the source files, name one '1.01', and one '2.0'.  Then edit 1.01 to add patches, and edit 2.0 to become the next version.

Version Control systems are to help resolve when fixes in 1.01 should (or should not) be included in 2.0.  And to reduce the amount of copying and redundancy needed to have two (or more) branches.
Tuesday, June 26, 2007
John Topley, you took the link right out of my mouth.
Sumana Harihareswara Send private email
Tuesday, June 26, 2007

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
Powered by FogBugz