Understanding Version Control using life case scenarios
Understanding the concept of versioning in software development can be a very difficult concept to crack especially for newbies in Tech. And so, it may look like rocket science and way beyond your comprehension. While this is not true, I understand some resources have explained it in more complex term than a newbie can understand. And it is to this effect I want to help you crack the code into smaller chunks of understandable pieces using scenarios in our daily lives.
While versioning isn’t a new concept, you probably have used at different times in your life without realizing it.
You playing a dame of dice, you made a move after rolling a dice count and just before your opponents make his moves, you retrace quickly your steps having realized you made a wrong move.
That’s the concept behind version control. Or at least, a part of what versioning is about.
Ever tried painting a master piece?
How much time did you make changes to the first (original) draft, rubbing off an edge just to get it that perfect feel? Probably a hundred times. Maybe more, maybe less. But you made changes at different points?
That’s almost the entire concept, only that you cannot retrieve and track the first version of the drawing for what changes were made, where, when and why.
So,
That’s the entire concept of versioning in Software development, with a little extra.
Still don’t get it?
Imagine you are tasked with writing an article / essay to be published in a local newspaper or in a school journal and after creating the first draft and proofreading decided to remove some paragraphs, restructure some and change some words / texts (basically editing the document). You then move to saving this new draft while preserving the previous draft, you use the save as button and rename the file as “draft 2” as supposed of just overwriting the previous version with the save button. Now you have 2 different copies of the document you can easily revert to and track what changes were made.
Version control can also be likened to creating a document on google docs and granting people access to make changes and comments on the document. Only that, it will be difficult and almost impossible retrieving the original document and tracking what changes were made after so many changes have been made.
Versioning a document / a code base is like saves snippets of changes made to a document (in this case) with a time and date stamp, name of the person who made the change, what change was made, a copy of the previous state of the document before the change was made, on what line the code was made and a bunch of other useful data’s needed to track each version.
This is basically the concept behind version control – tracking changes made to files over time so that you can recall specific versions later. It also allows you to work together with other programmers.
What then is version control?
A version control system is a software that tracks changes to a file or set of files over time so that you can recall specific versions later. It also allows you to work collaboratively with other developers irrespective of your location. All changes made to the code or files are stored in a database and developers can access older versions of the code and compare them with earlier versions to fix the errors should they arise.
It is a very helpful tool in software development. It allows for distribution of tasks amongst developers, it provides backup for uncertainty and allows for efficiency amongst the team. The most commonly used version control software is GIT.