Version Control

Version control also known as revision control or source control is a system that lets you track changes to files. It is most often used with source code to track changes between revisions of code. This enables previous versions to be recovered with ease, differences between versions to be compared and for source code to be branched to allow different versions to be developed in parallel. If you have never used it before the closest thing you may have used is track changes in a word processor such as Microsoft Word. However version control is significantly more powerful than this.

What can be tracked

Any files can be tracked, including binary files however all the features of version control are only available when tracking text based files. This can be source code, latex code, html, or many other text based files.

How does tracking work

When you have made a set of changes to your files you commit the changes and then synchronise them with the server. This allows collaborators to access your changes and pull them into their version of the files merging them in if necessary. You can commit changes as often as you want/need. Similarly you can pull changes from the server that may have been committed by your collaborators, or even by yourself from another machine.

Making use of version control

A distributed version control system called Mercurial is installed on mtheory and if you wish to have your own repositories then please ask the administrator. Repositories are password protected to prevent unwanted people changing your work. Only authorised users can commit.

Several GUI tools exist for Mercurial the most popular of which is probably Tortoise Hg. A free book is also available describing how to use Mercurial.

Leave a Reply

Your email address will not be published. Required fields are marked *