Let's Git this Party Started

Let's Git this Party Started

What is VCS?

VCS refers to Version Control System. Most of you must have got intimated by reading the very first line and would have made up your mind that VCS is something that is probably “out of your league”. Read ahead cause VCS isn’t rocket science.

Application of VCS in the real world: Know about the V (versioning) through VCS

How many of you have used the Google Chrome app on your phone? Almost everyone, I guess. For instance,an updated version of the app has been recently rolled out. However the developer team finds out that the latest update rolled out by them is causing the app to unexpectedly stop working in some devices. To fix this problem temporarily, they want the older version of the app to be rolled out for consumption. It is very difficult for the developers to find out which line of code among the 30,000 lines of code is causing such a problem.

This is where VCS makes the life of developers easy. The Google Chrome developers team has a copy of the code of the older version of the app stored in a version control system that is keeping a track of all the files and code associated with the app from the very beginning.

The VCS has special tools that marks where the changes in the code has been made. The places where the code has been changed are marked usually in a green color and the older/initial line of code is marked in red color. The developer executes few lines of code in the VCS terminal and the Google Chrome app is now working efficiently. This is the power of VCS.

My Previous Experience

We were a team of four members who were making a mobile application for our college. I was working on the front-end layer of the app. The other one was responsible for the back end of the app, while the other two were working on the middle-ware that connects the front end elements with the back end so that the app works properly and can be consumed hassle free.

One fine day, the back end guy made some changes in the source code and the app got completely messed up and was not working properly.

Our team later found out that all this drama was happening because of the change that was made in the back end wasn’t well coordinated with the other two layers , i.e. the front end and the middle ware. Thus, to have a collaborative working environment and keep track of all the three working layers, a need for Version Control Systems is very much required.

THE BIRTH OF VCS

The birth of version control systems took place around 1982 when Walter F. Tichy came out with the first Version Control System(popularly then known as RCS). RCS was developed as part of the GNU project. These systems started gaining popularity among the developers very rapidly, thanks to the formidable growth of the Open-Source Community in the last 2 decades. Without going into the other details of VCS, let us see how Git- a well known Version Control System tool works and how can we make the most of it.

GIT - The next Big Thing

There are many VCS tool available in the market such as

  1. CVS
  2. SVN
  3. GIT
  4. Mercurial
  5. Bazaar

GIT stands out among all the VCS. It is the most widely used VCS and is highly efficient. Like any other VCS, its work is to track changes in files and coordinating work on those files among multiple people. What sets it apart from other VCS, is its high speed of deploying changes and compatibility with existent systems and protocols.

Diving into the world of GIT:

The Git VCS can be used mainly in two ways-

  1. Through the GIT Bash Terminal.
  2. Using a GUI based softwares like Git Kraken, GitHub for Desktop etc.

1. The GIT BASH Terminal

2. GitHub for Desktop

Although Git is a popularly used VCS, there are still a lot of people who face difficulties in working with Git. This is maybe due to the incomplete knowledge of the Git workflow that people have.

Most of you must have got scared by seeing the command prompt type window aka The Ghost. Believe me, the only secret to learn GIT using GIT Bash, is to make the “GIT BASH” as your friend. Trust me ,he won’t harm you!

I will be dealing with the complete end-to-end workflow of Git and also how to use git using GIT Bash as well as any GIT GUI client.

The “HUB” in GitHub

We’ve established that Git is a version control system, similar but better than the many alternatives available. So, what makes GitHub so special? Git is a command-line tool, but the center around which all things involving Git revolve is the hub — GitHub.com — where developers store their projects and network with like minded people.

Why would you want to host your files on GitHub?

Because it provides a backup of your files and gives you a visual interface for keeping track of your project files. It makes collaboration easy. In a nutshell, GitHub is a cloud storage that allows developers to store their files, folders and other resources related to their projects on a cloud server. Anyone in the world can refer the code,copy it,change it and upload it again.

Now you might be thinking that someone might steal your code. Get this thought out of your mind, because this is how the world of open-source programming works.

There is a fine difference between Git and GitHub.

Consider you are a professional photographer and you use Adobe Photoshop to process your photos. You take the photos, edit them in Photoshop and when it’s ready, you upload them to your Facebook page.

In this context, Git is Adobe Photoshop and GitHub is Facebook.

GitHub serves as a storage area for files and Git is the one which keeps track of the changes happening in the files. Git is tool and GitHub serves as a service for projects that use Git.

Uploading files on GitHub doesn’t mean that any changes made in the files will be tracked. To track the changes, those files need to be under the control of the Git vcs. This is what differentiates the two of them. In technical terms, the files that are under the control of Git vcs are said to be “staged” and the ones that are not under the control of the Git vcs are said to be “unstaged”.

A project that is uploaded on GitHub without being staged on the GIT vcs is like a school with only students and no teachers, that is there is no one to evaluate their progress or keep track of them.The differences between the two will become more clear once you start working with them simultaneously.

The bottom line -

Still didn’t Git it???

NO WORRIES! Read the next part of this blog to know more about Git commands and the complete workflow in the Git environment. Please do let me know your thoughts, questions or suggestions in the comment section below. You can also send your feedback at syedsharjil@outlook.com

Sharjil Ahmed
Sharjil Ahmed Web Developer | Blogger | Chelsea Fanatic
comments powered by Disqus