Branching allows the creation of multiple similar code bases. A branch is a copy of all or part of a source code tree. Branches may be created for a number of reasons, including creating a test environment or adding new functionality that may cause an application to break.

Every branch that is created has its own copy of the code files and tracks its own incremental history separate from the original code base. All or part of a branch may be merged with the original source code in either direction. For example, a critical bug fix in the development branch could be merged into production, or tested functionality might be merged into the development code. Merge actions are also fully tracked by the code history.

Code management requirements can vary greatly and may need to be adapted for different organizations. Branching allows a great deal of flexibility in developing, testing, and updating applications.

Branching can be carried out from the Source Code Explorer in Visual Studio 2005 and is also supported by the Visual Studio 2005 command line tool.

Creating a branch in Visual Studio 2005