Before we start to discuss any topic regarding Git, the first question that comes to mind and that we have to answer is what is Git?
What is Git?
As a definition, we can say that Git is a distributed version control system. Most people are not familiar with Git yet those words are not quite clear. So let’s talk about what it is?
What is Version Control?
Version control or something maybe you here source control is a system that records changes to your file or the entire project, and then you will be able to recall any specific version of your project. In other words, the version control system allows you to go back in time and get previous states of your project. Also, you can compare changes in overtime. Let’s take a look at an example to better understand it.
Suppose, you are working on a project. I mean, you are building a website. You have done a couple of things and you already have the first version of your website. Then suppose you want to change something and also you want to lose the first version of your project.
So, what can you do? The first thing that comes to mind is to save the first version, then make a copy of it and work on the second version. Then suppose you want to make another copy and so on. Finally, you might have lots of different versions of your project and also your hard drive might be full. Agree that it’s not perfect an efficient way when you work, especially on large projects in order to avoid such a painful and insufficient way.
This system was created. So, it allows you to take snapshots of your project, this means it saves all different versions of your project, in just one directory.
Types of Version Control Systems
There are mainly two types of version control. The first one is centralized and the second in centralized or distributed.
Centralized version control systems have a single server that contains all the different versions of the project. So, the developers can collaborate. But actually this kind of VC has downsides.
If you don’t have a network connection you will not be able to get access on versions and also if for some reason server corrupts then you will lose all your data.
This is the second type of VC system. But in case of distributed these systems, you save your versions of the project locally on different computers, and also on the server and each copy of your project is a full backup of your project.
Need of Version Control
Nowadays there are a couple of different version control systems, but the most popular one, which is widely used today, is Git. Those days when web development is an extremely fast, a growing industry in the world and has to be a good and professional web developer, then you should definitely know how to work with Git. We are working on different projects at the same time and without a version control system, your working process might be hard and painful.