Version control
Posted by Flib on January 9th, 2009 filed in Business, DevelopmentEveryone makes mistakes. Its a fact of life. The question is how do you cope with them?
[Note: version control of websites, while very common in the wider software development community, is still fairly rare in the web industry, so don't be suprised if you ask a web developer and they look at you like you have two heads.]
We haven’t been using version control (subversion specifically) for that long at Technomonk, however we have seen its advantages and wont go back to non-version-controlled development in future.
In the bad old days, we used to hack together web code live on a server or hack it together locally and upload to the server wiping out my previous version. If you make a mistake – OOPs! – you might have wiped out a lot of work.
The next step was to zip the site up every so often and store it somewhere safe. What happens if you make a change to a file and only spot the problem a couple of months later? (Rare but has happened) Can you easily find the version of the file that didn’t have the change?
The problem with manual archiving is that you have to remember to backup and you also need to label the backups in a way that allows you to find the version of the file you want.
Version control changes this.
Every time you check in a change, you write a comment discribing the change to the file or files you are commiting to the repository. So its fairly trivial to look at the change history of a file and see all the changes that were made to it and by whom.
That alone is a compelling reason to use version control – but wait there’s more. Have you ever took a version and made a few changes to try something out without wanting to affect your main codebase?
This is easy with version control. You can make a branch of your code and try some new stuff and either merge it back into the main code base (the trunk) or just abandon it. A branch acts completely seperately from the trunk so it wont affect your main code.
You don’t need to restrict version control to development work though, you could just as easily put configuration files into repository so you have a track of changes made over time. Most wikis keep track of changes; this is also version control, just built into the the wiki engine itself.
We are seeing a real value in version control and will be using it a lot more in future.
Leave a Comment