What is a Version Control System?
Well, a Version Control System is nothing more than what it’s name suggests. It is used to keep a track of various versions of a file, so that you could revert to or go through mistakes that you made after modifying that file or any other practical situation that wants you to have a look at the previous version of the file. Suppose for example, You created a Word document on “Various types of cakes in the market”. You added all the available cakes in the market along with their prices. Now, for some reason, you thought that prices are not required in this document as it is only about the “Types” of Cakes and not their cost. You gradually removed the pricing from all the cakes, had a final look at the document, and saved it. Suppose, the next day, a friend of yours had a look at the document and got really impressed with it, but wait a sec, He says “It would have been better if you listed the prices, It would have become a great resource for people to select cakes.”. Okay, Now you would surely criticize yourself for removing the prices. You don’t have any other option cause you already saved the document a day before.
Well, it may be a silly example to consider for you now. But believe me, in real world development, there are thousands of changes that happen to a file (program in particular) that could affect the overall state of the project. This is why, Version Control Systems were made. In brief, A Version Control System tracks your changes in a file, uploads them to it’s server and makes them ready to be fetched anytime you want them. Believe me, It saves a Lot of time to the developers. It also helps in Version specific updates of programs, like keeping a stable version, a testing version and a prototype separately and secured on the servers.
Examples:- The most widely used is GIT, and others include CVS, SVN etc.
GIT or GitHub
Git is a Version control system as you read above. But what is GitHub?
I’ll try to answer it as simply as I can. GIT is a tool or a connector which runs on your local machine and tracks changes, when it identifies and processes the changes, it sends them to the Hosting Service for Git which is nothing but GitHub. You can see it this way, GitHub is the actual Service or the actual Server which stores your changes, and GIT is the utility which integrates with your local working environment to make it easier to track changes and transfer them to the server. The other option to update changes is to directly visit the GitHub’s official site or Desktop Application, upload your files, and update them. The latter approach could be sickening when you are working with large amount of files on a big project, hence GIT is widely used in development.
GitHub is a platform for Version Controlling, Sharing files, working in teams and so much more. Suppose, you are working in a team of four people on a medium project, you want to make sure that the same code is synchronized with all the four members. If person 1 makes a change, it should be notified to the rest three, and that change should update in the main code after approval of the rest, this saves a lot of time, copying and e-mailing codes to synchronize and get them approved. GitHub makes it very comfortable for developers to collaborate.
GIT is a Command Line Interface(CLI) utility which easily integrates with your default Command Prompt. Knowing some basic commands and terminologies of GIT and GitHub can make your production work a lot more efficient.
So, add it to your Web Development Toolkit, because now we are going to dive deep into GIT and learn more about Commands like add, push, commit etc.
In this post we’ll discuss some basic terminologies in GitHub and in the subsequent post, we’ll learn about the commands. As a rule of thumb, you may also remember that GIT is for your local machine, and GitHub is for online access(like a website).
Repository
A Repository literally means a container for storing things in large quantities. Well, that’s exactly what it is in the World of Git. In GitHub, you create Repositories to record changes of your various files, keep their versions separate, set them out for display and more. You You may say that when you initialize a repository on GitHub, GitHub allocates some space/storage for your work on it’s server. Hence, the first step of your project with Git is to initialize a Repository. Wel’ll discuss in detail about it in the subsequent post.
Commit
Commit in GitHub confirms with you whether you are sure to make the changes in the concerned files or not. It locally saves the changes on your machine when you commit changes using the command (to be discussed in the next post). Basically, commits are at the core of Tracking Files. When you commit changes, the date, time, user information, and a commit address is generated which eventually gets transferred to the server.
Branching
A Branch in any Version Control System(VCS) ,points to all the commits made in that particular branch or segment or version of files. Let’s get a little deeper now. When you create a Repository, by default GIT assigns to you a MASTER branch. This MASTER branch generally stores all the commits you make to your files. Now, when you branch this main branch or MASTER branch, a separate copy of the whole version on the MASTER is made and stored on your local machine (say this copied branch is ABCD), now this is the cool part, you can play with this copied branch, make the desired changes, and finally when you are happy with the changes, you can easily change the MASTER branch if you want. So you see, here you have completely different versions of files, one is the MASTER branch and the other is the ABCD branch. You can do anything in the ABCD branch without affecting the MASTER branch and vice-versa. You can create multiple branches from any branch.
I would like to highlight Git in the scenario of Branching. Branching is not at all an easy task in terms of processing speeds and disk space, but Git offers a really good Branching service, which maintains the branched copy in your local machine irrespective of the Internet speed. GIT stands out the clear winner when you compare it to some other old version control systems like SVN.
Forking
Forking is just making a copy of a Repository. Suppose you want to make a separate version of a project and work on it, testing out features and other stuff. This helps in keeping the original repository intact while you test out the copied version. You may fork a repository that someone else is working on, and suggest your own changes and a lot more.
Cloning
Cloning is just like Forking i.e. making a copy of a Repository. The difference is it creates the copy on your local machine so that you can access to it without internet. Another point to note is, Forking takes place on GitHub, while, Cloning takes place on GIT CLI. I hope you can distinguish between them.
These were some really basic terminologies in the world of GIT and I hope you got a GIST of GIT( don’t know if I just made a joke XD). We will have a look at the commands in GIT CLI which can help you to actually start working with GIT, in the next post.
If this post really helped you, please share it, it would make my day, Thanks.


Leave a Reply