A Version Control System (VCS), also known as a Revision Control System, is software that manages changes to collections of files and directories. While a VCS is useful for managing changes to many types of files, this software is particularly useful for programmers to save files for the source code of computer programs. A VCS keeps track of all of the changes that occur in each revision of the file, the person who made the changes, and the reason behind the modification. Changes are usually identified by an incrementing number (also known as revision number) or letter code, and reflect the content of the files at a specific point in time.
Why is there a need to use a VCS when you can simply save the files in a different filename in one folder? Unlike your usual multiple file saving process, a VCS does not store the full copies of each revision. Instead, it stores only the changes that happen in each revision. That saves a lot of disk space, and also removes the need for the user to manage the naming of the revisions manually. Hence, a VCS is particularly useful for large, fast-changing projects with multiple authors who all need to track and coordinate all changes in each version.
When the most recent version of the file is modified or corrupted, a VCS makes it easy to go back to the previous revision and start again. Also, programmers use the VCS to compare the different versions of their software. By comparing the different versions, they can determine when bugs were introduced and also when were they fixed. Any problems that may arise from a change may be addressed by reviewing the revision, noting who made the change, and the reason behind the change.
Tracking of different versions is also necessary in establishing precedence. Because a VCS keeps track of the person who made changes to the file, it can provide necessary data to solve a dispute regarding ownership of code or ideas.
Version control systems are especially useful for collaborative work. Multiple users can edit the files at one time, without affecting each other’s changes. When they have finished working with a file, they can then decide to merge their versions as one. When two users independently change the same part in a file, they are automatically flagged when the files are merged. Hence, they are still responsible for tracking if the final version is correct.
Version Control Systems can be provided using software installed in-house, or can be accessed via an online version control system provider. Online VCS systems also provide additional functionality, such as bug tracking, archiving, and user management. They are often used for projects that do not have the resources yet to maintain their own server for version control, and also for projects that wish to benefit from the ease of use and additional redundancy provided by an online system.
Concurrent Versioning System (CVS) used to be the most widely used version control system. However, Subversion and Git have long since overtaken it, and are now the most commonly used systems for open source projects. The basic capabilities of these systems in some ways are quite similar to CVS, but they offer much greater functionality.
Some version control systems, like CVS and SVN, have centralized repositories. This works by setting up a single repository which acts as the central store of the system. The repository usually stores information in a hierarchy of files and directories. Check-outs and check-ins of files are done with reference to this central repository. Multiple clients can then connect to the repository and commit changes. Normally, they can only see the latest version of the files. However, they can also review the change history and restore previous versions using VCS tools.
Alternatively, in a distributed VCS like Git or Mercurial, many repositories may be used and no single repository is authoritative. Files can be checked out and checked into any repository. When a file is checked into a different repository, it is integrated as a merge or patch. The responsibility then falls on the users themselves to determine which repository is authoritative.
Ultimately, Version Control Systems have been widely studied and applied in the software engineering community for a long time. These systems are being continually developed and improved to best meet the needs of both small local teams and large distributed teams. A VCS is now considered an essential component of any modern software development process.