What is Git (in 2 minutes)

More from Karlgusta

So, what is Git, and why is it so popular?

Git is the most popular Version Control System in the world. A Version Control System, records the changes made to our code overtime, in a special database called Repository.

We can look at our project history, and see who has made what changes, when, and why. If they screw something up, we can easily revert our project back to an earlier state.

With other Version Control Systems, we will have to store copies of the entire project in different folders. For example, Folder 1.0.0, Folder 1.0.1, Folder 1.0.2. This is very slow, and doesn't scale at all. This is especially true if most people have to work on the same project.

Everyone will have their own folders on their computers with different versions. You will have to send the latest version of the code via email or any other mechanism, and then manually merge the changes.

So, in a nutshell, with a Version Control System, we can track our project history, and work together.

Now, version control systems, fall into two categories:

  1. Centralized and

  2. Distributed

In a Centralized System, all team members connect to a central server, to get the latest copy of the code, and to share the changes with others.

Subversion and Microsoft Team Foundation Server, are examples of centralized version control systems.

The problem with the centralized architecture, is the single point of failure. If the server goes offline, we cannot collaborate of saved snapshots of our project. So, we have to wait until the server comes back online.

In Distributed Systems, we don't have this problems. Every team member, has a copy of the project with the same history on their machine. So, we can save snapshots of our project, locally on our machine. If the central server is offline, we can synchronize our work directly with others.

Git and Mercurial are examples of Distributed Version Control Systems.

Out of all this, Git is the most popular Version Control System in the world.

Why Git

  • It is free

  • It is open-source

  • It is super fast

  • Scalable

  • Cheap branching/merging

Operations like Branching and merging are slow and painful, in other Version Control Systems like Subversion or TFS. But, they very fast in Git.

So, Git is almost everywhere. More than 90% of Software Projects in the world use Git. That is why almost all job descriptions for software developers mention Git.

So, if you are looking for a job as a software developer, Git is one of the skills you must have on your resume. You should know it inside out, you should know how it works, and how to use it to track your project history, and collaborate with others effectively.

Happy Coding!

More from Karlgusta