Tuesday, 10 February 2015

Git’ Delphi

- or why you should use version control for your precious source code.

A while back Jim Mckeeth tweetet a link to getAwesomeness - listing some nice Delphi projects on GitHub. Which brings me to the point of this post; a brief intro to the wonderful world of version control systems – and why you should start using one, if you do not already do.

Delphi comes with build-in support for Subversion (since XE2), Git (since XE7) and probably others to be added later. A number of third party plug-ins exists supporting some of the other systems out there.

I have used various CVS, VCS or DCVS over time – PVCS, FreeVCS/JediVCS, StarTeam, TFS, CVS, Subversion, Bazar and Git – and I am not an expert in any of these.

I have meet people that do not trust version control system – even when they are fairly well integrated into their favorite IDE, they stick to copying folders and zip files. Even if you are a single developer just playing around for fun, you should get used to controlling your code using some VCS – it adds so much more to your toolbox/skill set – and is probably the single most important thing you need when coding.

The question is then what type of version control system you should look at – let me give you a couple of “free” examples:


Based on Thomas Hensle's FreeVCS, which I have been happy using many years – it lacks more advanced features – but for small non-distributed teams it is sufficient – the source is in Delphi and you can chose your favorite database as database for the server application that runs on Windows (only) either as a service or an application. It integrates well into the Delphi IDE, but also has a standalone client and a diff tool (you can chose to use Beyond Compare that is included with the IDE – or something else you might prefer).


A centralized version control system, that still in many places is the de facto standard, taking over the heritage from CVS – handles large teams – and even small teams or single developers might just setting up a NAS which offers a Subversion (svn) “package” out of the box – Synology products is one example. Embarcadero keeps their sample source code in a Subversion repository, so that you always can get updated and new samples whenever they are available.


New kid on the block and is like Mercurial (hg), a distributed version control system, which is designed to handle distributed teams more efficiently, since the user has a clone of the full repository locally – he/she can work offline and just push/submit the changes made whenever online again. You can from Git access Subversion repositories, which could ease an eventual migrating to a more distributed workflow.

Version control systems can control whatever digital assets you need to – but typically it is targeted source code and related files – since versioning and compare this type of data is more relevant – web pages are also source code.

There are numerous clients – for use with all your other assets – I do like the Tortoise range which are free and available for both Git, Hg and Svn.

Do spend a bit of time on getting acquainted with the terminology and idea behind the different systems you chose as candidates – and pick the one that fits your needs in tie to come. Having used a version control system also adds a valuable tool to your CV – getting into the flow and habit – seems to be hard for some people – so I think it is a point valuable point to show that you care the source code.

Being able to use one of the more version control system which have been adopted by various open source project, also gives you an opportunity to contribute to one or more of these projects :-)

This week is #DelphiWeek, with a whole lot of Delphi related stuff going on – and I will try to do a post every day this week if time allows. They are probably going to be kept short without too much code – but still with what I consider could be valuable info for some (and trivial for others – like the the rest of the internet :D)

Happy #DelphiWeek 2015 :-)

No comments:

Post a Comment