What is Git?

What is Git?

ยท

4 min read

Let's start with a simple answer to the question above.

Simply put, Git is a software tool for keeping track of changes to files.

And that's all. Well, you will hear and read so many other definitions like:

"Git is a distributed Version control system that tracks changes in any set of computer files, usually used for co-ordinating work among programmers who are collaboratively developing source code during software development."

Now this definition has a lot of terms which I will walk you through but it's the same thing and to understand more of what tracking files is, Let's look at an example.

The "RED SPOT" ๐Ÿ”ด

Let's say you're in a group of people working for the CEO of Apple. The role of the group is to write the speech of the CEO.

This written document has most of what the CEO is going to talk about the world about the iPhone 15 series. Each member of the group has to write about a category of the capabilities of the iPhone 15 for example one member has to write about the new CPU chip, another has to write about the battery life, and the list goes on.***

But before it is presented to the CEO, there must be some sort of discussion among all the group members agreeing on all that is to be presented as a group hence all must see and read the whole document for uniformity and accuracy.

So all this is done but the Team Leader says the work done on the speech is good but he will need to do some little edits to it to make it perfect.

The Team Leader does so and brings the document (which is about 500 lines of text) back to the team for the final revision.

Question:

How are you going to know what the Team Leader added to the document?

Answer:

There are two ways you could do this:

  • Read the whole document again to see the edits.

  • Use the "RED SPOT ๐Ÿ”ด"

Read the whole document

For you and the team to revise the finished document, reading the whole document again from start to finish is one option. But this is very slow (because the document is very long) and inefficient because since you didn't write the whole document, you have no idea of what the others wrote exactly to know what your Team Leader added, It's just a mess.

Use the "RED SPOT ๐Ÿ”ด"

One thing I didn't mention is that when the Team Leader was making the edits to the document, at whatever point he made an edit, he would also add a "RED SPOT ๐Ÿ”ด" aside the edit to easily identify what he added to the document.

This is very effective and fast because when each member of the team is looking through the document, one doesn't need to read the whole document. One can just look at the "RED SPOTS ๐Ÿ”ด" to easily view wherever the Team Leader made a change.

This is exactly what Git does hence the name version control system( keeps track of versions of a file). It works like the "RED SPOT ๐Ÿ”ด", but it even does better, Git not only helps you to identify and keep track of changes made to a file or groups of files but also has some sort of functionality whereby for each change made to a file or group of files, one can leave a message associated with the change made (like the reason why one has made the change to the file etc). In Git, this is called a "commit message". We'll see more on that in a future article.

Summary

And that's it. Git is simply a version control system that tracks any changes in a file or set of computer files.

In real life, this gets even more complex when it comes to keeping track of thousands of lines of code for developers but hope you get the idea of version control though.

ย