Presently, my workflow in Contao consists of having my development server mounted as a webdrive. I then open the files directly in a text editor (sublime), make my changes, hit save and refresh the page to review. I also do all my JavaScript and css editing using the same method (much easier than using the built in editors in contao for my workflow).

I want to introduce a version control system into this process, unfortunately, I'm at a loss how to proceed. I have a production server and an identical development server. I would like to be able to make changes to templates and files on the dev server, track the changes, and push the changed files to the live server when ready. I need to edit the files in their working location since I can't test a template file outside of a working Contao install. I would also like to be able to create branches that allow simultaneous development of alternate layouts of the same template files. I can use TortoiseHG and Mercurial combined with Webdrive to turn the development server templates, css, and js folders into repositories. This seems to work (I can track changes and do commits), but I don't see how I could create a branch or any other kind of alternate working copy. I can clone the Templates repository, but that doesn't do any good since the files are no longer in the template folder that Contao is using. Maby I'm going about this all wrong (very possible).

Anyone else out there using a version control system with Contao for active development? If so, do you use branching and how do you manage to work with it?