Go to the first, previous, next, last section, table of contents.

Multiple Branches of a File

One use of version control is to maintain multiple "current" versions of a file. For example, you might have different versions of a program in which you are gradually adding various unfinished new features. Each such independent line of development is called a branch. VC allows you to create branches, and switch between existing branches. Note, however, that branches are supported only with RCS.

A file's main line of development is usually called the trunk. The versions on the trunk are normally numbered 1.1, 1.2, 1.3, etc. At any such version, you may start an independent branch. A branch starting at version 1.2 would have version number 1.2.1.1. Consecutive versions on this branch would have numbers 1.2.1.2, 1.2.1.3, 1.2.1.4, and so on. If there is a second branch also starting at version 1.2; it would consist of versions 1.2.2.1, 1.2.2.2, 1.2.2.3, and so on.

If you omit the final component of a version number, that is called a branch number. It refers to the highest existing version on that branch. The branches in the example above have branch numbers 1.2.1 and 1.2.2.

A version which is the last in its branch is called a head version.


Go to the first, previous, next, last section, table of contents.