We have recently switched from using self-hosted SVN version control to Git version control hosted by Beanstalk.
Here at Enovate, we always pride ourselves in making websites that are beautifully crafted and simple to edit for our clients. But there comes a time when we have to reflect on how we go about building those websites, and make the process as simple and effective for us as well.
Great things have been going on in the Enovate office; we have swapped our first choice CMS from MODx to Craft, the recent opening of a Dunkin’ Donuts store in the city centre has kept our sugar levels up, and now all of our new client websites are held in Git version control hosted with Beanstalk, rather than our own self-hosted SVN version control.
So what is version control?
Version control gives us the ability to keep a record of all the changes we have made to our websites or web applications, known as ‘commits’. These commits could range from small updates, such as CSS or front-end template updates and bug fixes, to larger updates, for example new site components.
With all of these changes stored in version control, we can revert the site back to an older version if there are conflicts, or the added feature isn’t needed anymore.
Commits are stored in what’s called a ‘repository’. If you are a company working on multiple websites, you would give each website its own repository, which ensures that code for each project is segregated.
While of course there is much more to Git version control than we can possibly cover in a blog post; the basic steps are as easy as 1-2-3:
- Make changes to your local site/development environment
- Commit those changes into version control using Git
- Deploy the changes to the live site
Why not just FTP changes?
While FTP works well in the sense that you can directly add new files into your website or application, the major downfall is in that this is a very permanent process. Unless you have stored backups of the website before making changes, there is no easy way to revert things back if something goes wrong. This is where version control comes into its own.
Imagine a scenario; you’re building a website for a client who constantly changes their mind, and you find yourself constantly FTP’ing update after update straight to the live site. By using FTP, you have absolutely no record of the changes you have made in the past, and there is no way you can un-do a specific change without uploading yet more files.
Now imagine the same scenario, but you have been using version control this whole time. Your repository would contain a list of all your commits, with a little message by each one describing exactly what was done in the update. So now you would have a full list of all your site updates, and you can un-do these updates at any time!
It certainly makes sense using version control, the flexibility and control you get is just unrivaled. There are many companies who offer Git hosting for your repositories; some are free while others charge a monthly fee. At Enovate, we have found the best one so far is Beanstalk.
We would definitely recommend switching to this platform; to find out a bit more head on over to the Git website for full documentation and support.