Let's recap what we have done so far. We started application development with a simple script. Gradually, we redesigned the application, added new features and fixed bugs to transform it into its current state. What if you want to go back to an earlier state of the code, say the code you wrote two days ago? You may want to do this for various reasons. For instance, the latest code might have some bugs that you didn't see two days ago. Imagine another scenario where you are collaborating with your colleagues on a project and you all need to work on the same set of files. How do we accomplish that?
In such situations, a version control system (VCS) comes to our rescue. It maintains a record of changes you make to the code. The files and directories now have a version associated with them. The VCS enables you to pull a specific version of any file.
There are several version control systems in use. Git, SVN, CVS, and Mercurial are some of the most popular open source...