transmission line noise


Ver­sion Con­trol Systems

18 Dec 2009

Tagged with GIT, Version Control


Just some overview notes on the subject.

Which VCS?

There are many vcs’s around both free and paid for. The type of VCS while impor­tant is not as impor­tant as actu­ally using. From the sin­gle devel­oper up to big teams there is no way you should be cod­ing with­out a VCS.

There are cen­tralised sys­tems such as Sub­ver­sion where the project is held on a cen­tral server and devel­op­ers check out and in and deploy­ments are made from this cen­tral repository.

Then there are dis­trib­uted sys­tems, DVCS’s, such as Mer­cu­r­ial and GIT. With these the devel­oper has a local repos­i­tory, does all the devel­op­ment, check­ing in and out locally and when appro­pri­ate will push changes to another remote repos­i­tory to be merged.

See the end of this post for var­i­ous links

Some of the points to be kept in mind when using VCS’s

Branch­ing Merg­ing and Tagging

In SVN the prac­tice is to have three direc­to­ries, Trunk, Tags and Branch. For DVCS’s the con­ven­tions are some­what dif­fer­ent but I am going with the SVN nomen­cla­ture to sim­plify things.

For DVCS’s the pic­ture is sim­i­lar as a process but dif­fer­ent in exe­cu­tion. Here the repos­i­to­ries can be cloned in total and worked on as a branch and then merged locally and then again merged with the remote/master repository


Devel­op­ment is done on local machines, checked out, worked on checked in or merged and then the deployed to the test envi­ron­ment (you do have a test envi­ron­ment don’t you?) and if it passes then deployed to the pro­duc­tion server. Ok that’s a sim­pli­fied ver­sion but some­thing along those lines.

Deploy to a stag­ing area and then to move to the test server or the live server by using shell script­ing that will con­sol­i­date, add, edit, alter the files and then deploy them automatically.

rsync is a highly effec­tive way of mov­ing files from one server to another and has a plethora of options such as –delete which will remove files from the tar­get server that have been deleted in the repos­i­tory, there­fore keep­ing the server uncluttered.

exclude which can be pointed to a file will allow you to exclude file, say con­fig files which dif­fer between test and development

it is also pos­si­ble that all the assets are not in the repos­i­tory. Stor­ing assets such as images do not scale well in ver­sion con­trol sys­tems because these files are already binary, so a minor change can mean the whole file is altered and then stored in the VCS. This can add sig­nif­i­cantly to the repos­i­tory size which will reduce its effec­tive trans­fer speed.

The other major advan­tages of script­ing the build is the speed of deploy­ment, the fact that you will make far less mis­takes espe­cially when you need to deploy under pres­sure. It allows you build unit tests in and it opens the route to con­tin­u­ous inte­gra­tion in the future.

GIT Man­ual

SVN Book

Mer­cu­r­ial Book

comments powered by Disqus