Version Control
Blog

Importance of Version Control and Test site for your project

If you’ve ever worked together with a group of people on a project, then you definitely know the annoyance of constantly swapping files. Either you would prefer to do it by email or by uploading the files or some other means. Whatever it is, its a burden and every designer or developer knows that.

Version control helps you overcome this burden. Not only developers or designers, but every person can get benefited by using version control. It helps you to keep copies of required files and designs. Setting up and using version control has perhaps the best outcome, in terms of improving your research effectiveness and general happiness.

You must be wondering why there is a need for this? For that you must understand what is version control and what it does.

Release control or version control is a repository of files, that tracks revisions of data along with the person who made the changes and for what reason. It keeps record of the changes made over time, so that you can revert back to previous versions at any stage.

VCS keeps references on problems that has been fixed in the past or any enhancement introduced due to recent changes. It also keeps backed-up versions of your work or code , so you need not worry just in case anything goes wrong.

There are basically two types of version control that is being commonly used: distributed and centralized VCS.

  • A distributed version control system is a system which stores complete history of the project files into another special folder which is hidden and kept inside the working copy of hard drive. So the developer can add changes to his work or code both when he is online or offline. Examples are Git and Mercurial.

  • A centralized version control system keeps history of changes on a central server from where everybody calls the latest version of the code and moves the latest changes to. CVS, Perforce and SVN are some commonly used centralized version control system.

Next lets throw some light on the development process. Usually in development process, you require 3 distinct sites.

First is the production site, the one that world sees. Next you need to have a staging site which apears as staging.yoursite.com, dev.yoursite.com or test.yoursite.com. This is your test site and you need to put a username and password in front of this site so that the search engine’s can’t index it. The last one is a local version of the production site that a developer will have on his local machine.

Lets see how it works:

  • Once a developer starts working on a site, what he does first is pulling the production code from the git repository and copying the production database down from the production site.
  • By doing this, even if the developer commits some mistake and completely mess up the site thus displaying some errors. He need not have to worry since it’s visible only to him. But if he had done it directly on the production site then, the customers would have seen this.
  • Now when the developer feels that the features are running as desired, he need to push the code changes to the repository. Next he reaches for the staging site and pulls these changes from the repository and makes necessary database changes.
  • The customer can now go to the staging site and test the changes . If the customer approves the change, the developer goes to the production site and pulls the changes from the repository and makes the required database changes.
  • With this you can test one set of changes on staging while you are running a tested code on production. And without this you are more likely to display errors to your customers.

Version control makes your everyday working process simpler and less annoying and gives you confidence to carry out more ambitious experimental work. For a successful software project, a version control tool and a test site is a necessity.