however, even that process stops. The branch is“frozen” for final testing right before a release.
•
The branch is tagged and released.
When testing iscomplete,
/branches/1.0
is copied to
/tags/1.0.0
as areference snapshot. The tag is packaged and releasedto customers.-
•
The branch is maintained over time.
While workcontinues on
/trunk
for version 2.0, bugfixes continue tobe ported from
/trunk
to
/branches/1.0
. When enoughbugfixes have accumulated, management may decideto do a 1.0.1 release:
/branches/1.0
is copied to
/tags/1.0.1
, and the tag is packaged and released. This entire process repeats as the software matures: whenthe 2.0 work is complete, a new 2.0 release branch iscreated, tested, tagged, and eventually released. After someyears, the repository ends up with a number of releasebranches in “maintenance” mode, and a number of tagsrepresenting final shipped versions.
Feature Branches
A
feature branch
is the sort of branch that's been thedominant example in this chapter, the one you've beenworking on while Sally continues to work on
/trunk
. It's atemporary branch created to work on a complex changewithout interfering with the stability of
/trunk
. Unlike releasebranches (which may need to be supported forever), featurebranches are born, used for a while, merged back to thetrunk, then ultimately deleted. They have a finite span of usefulness.Again, project policies vary widely concerning exactly whenit's appropriate to create a feature branch. Some projectsnever use feature branches at all: commits to
/trunk
are afree-for-all. The advantage to this system is that it's simple—nobody needs to learn about branching or merging. Thedisadvantage is that the trunk code is often unstable orunusable. Other projects use branches to an extreme: nochange is
ever
committed to the trunk directly. Even the
Leave a Comment