Version Control

From DataFlex Wiki
Jump to navigationJump to search

Version Control, sometimes known as Revision Control or Source Control is the concept of managing multiple revisions of source files. By using version control, developers are able to track changes made to source code files, and where neccessary revert these files back to an older state.

There are many Version Control software packages available for developers, both free and commercial.

Why use Version Control?

Version Control has many uses. not only does it track changes to your source, but also becomes a backup of this information. Buy using version control you could effectively revert your entire workspace to represent the code of previous versions of your software.

Also, when working in a multi-developer environment each user exclusively check out files, as well as tracking changes made by other users. This can help limit confusion when two developers make changes to the same file at once.

Version Control can also be integrated with Bug Tracking Software. For Sourcegear's Fortress Package includes both Version Control and Bug Tracking modules, so that files may be checked in against bugs.

Concepts

Checking In and Out

In a version control system source files can be checked out, and then once changes have been made checked in. This concept is particularly useful when working in a multi-developer environment.

Branches and Branching

When working with version control, you work in what is called a Branch. Every version control has a Main Branch, which is the master set of source files.

Branching is the concept of making a copy of the source file(s) seperate from the main development branch. This is useful when working on a project and you don't want to include these changes until the project is complete. Once complete these files can the be merged back into the main branch.

Tagging and Labelling

Source code can be tagged or labelled, and thes tags can be used to access certain versions of file. For example, a tag could be set on each file as a version of your software is released. Should you need to obtain a copy of all source files as they were at the time the version was compiled, you could fetch all of the files tagged with the relevant value.


Free and Open Source Packages

There are many free and Open Source version control packages around. The main ones are CVS and Subversion . Both are extremely powerful, though arguably harder to use and setup than many commercial packages

Commercial Packages

Commonly used commercial Version Control packages include Microsoft's Visual Sourcesafe and Sourcegear's Fortress and Vault Packages.