Git & GitHub: The Need Of Developers!

Git & GitHub: The Need Of Developers!

What is Git/GitHub Why Do We Need it ?

ยท

8 min read

Okay! As Promised in My Last Blog Post, that I'll be coming up next with the most demanded article that is **Git & GitHub...**I Came Up and hence the Promise Was Kept!โœŒ๏ธ

So, As I Already Mentioned in the last blog that having some prior knowledge of VCS(Version Control Systems) is going to be the prerequisite for this blog so that you can gain maximum out of it, I hope you folks have read that article and thus I'm assuming that you all know what exactly is VCS and how it works.

In Case, You Haven't Read That Out ๐Ÿ‘‰ Click Here

So, Before Any Further Delay, let us Dive Deep Into Our Discussions!๐Ÿš€

What is Git ?๐Ÿค”

So, Git is basically a Version Control System(Distributed), remember in the last blog we discussed it in a very detailed manner, that tracks the changes or modifications made in our git repository.

Why is Git Around ?๐Ÿ’ญ

You Might Think Why is Git Around, I Meant, without git also everything was working absolutely alright, so why?

So, Let Us Understand The Need For Git via an example.

Suppose, You Have A Website Named xyz.com say in the folder named XYZ-website, and let us say it contains some files named F1,F2,File3,Data.csv, these could be any files of any extension, for the sake of simplicity, I chose them.

Now, When A Piece Of SoftWare is made, it is not like that it will be made in a single go right!.. It Evolves With The Time Right ? Yes Of Course!

Take The Example Of Very Renowned Software like our operating system say Windows, it is next to impossible to build such complex software in a single go...What that means is that, you are trying to build the entire software in one attempt itself, and since the time it doesn't get completed, you won't publish it anywhere, In Other Words, it meant, you are trying to build something only once and assuming that it is going to be the best that will not require any updates in the coming future...but do you think it is an efficient way, No Never! because you never know what could happen in the future right, who knows that whatever you build today will never get vulnerable in the upcoming future...You can't play a bet on such an inevitable thing as in today's generation every single day new things are getting discovered, new vulnerabilities, and never-ending demands of people using the software increasing every day and also you never know what situation demands in the next 5 yrs or 10 yrs or 15yrs, you got the point and if you as a developer are not considering these concerns, you might lose something very big!

This Could be understood with one more example, we know that the latest version of windows is Windows 11 which was rolled out on October 5, 2021 by Microsoft. Did You Get The Final Version Of Windows till date ? No, Right! Microsoft frequently provides updates so that they can best serve their users.

Similarly, in the case of our website too, Like you are working with the UI/UX part and changing as per the need.

In Simple Terms, everything starts with something and gradually it becomes better and better with time.. but what is the role of git ?

And To Track the records of changes made is the responsibility of the programmer, Now Just feel how hectic it could be managing all such records.. Nightmare!

Let us Understand The Need With One More Analogy!

We used to work on the files say a PDF file, You Created A PDF file, then save it. What if you need to make some changes and save it again (say initially, your files name was project.pdf and after making some changes in it you saved the changes in the new file say projectFinal.pdf Of Course! , We Can Save the Changes within the same file but we want to keep the track of the changes made. Say Again You Made some changes and saved your file with the name project_final.pdf and things go on as you never know when you want to update the file also it might happen that while modifying the file, you have made some mistake and want to go back to your that file which you have previously modified, that's the reason why we were making new file every time! So, That you can access your lastly updated file.

Now, Just Think as if the original file is very large in size (say 200GB) and you are doing the same things as you were doing in the above case i.e., making a new file always, when making any changes and what does that mean, You Might have got the feel what I'm trying to convey out! and You might have guessed it right too, what about the Hard Disk? It Will Immediately Become Full!

Now, Is That An Efficient Manner to keep the track of the files ? No Not At ALL! ๐Ÿšซ

Hence, To Solve All These Problems Git(VCS)is Around!.. There Are Several Other VCSs, but Git is One Of The Most Popular Among them!

๐Ÿ‘‰By Now, You Would Have Gotten a Real Feel Of The Full-Form Of VCS i.e., Version Control System!

You Got The ANSWER!๐Ÿ‘

History Of Git: How Was Git Created ?

There was a Computer Scientist named Linus Torvalds who first started writing Linux Kernel, He Was The Major Contributor to Linux at that time.

Creative Destruction & Controversies Lead To The Discovery Of Git, Let Us See How!

From 1991-2002 Linux Was in Development Phase in Patches & Archive Files. Contributors among exchange by sending files/patches, No VCS was used by them. But Gradually The Project Of Linux Started Growing i.e., Linux Kernel which lead to an OS like Ubuntu(These are the distributors Of Linux).

When Linus Torvalds and other members were working, they thought that as the project is growing, they can't just go in the manner, they used to go i.e., by exchanging the files and contributing as the project was getting bigger in size.

So, In 2002 They Went For The VCS named Bitkeeper,it was free at that time (At That Time Git Wasn't Introduced!) From 2002-2005, they kept working on Bitkeeper, everything was going perfectly alright

But suddenly in 2005, The Company Which Made Bitkeeper VCS denied giving its service for free to the Team. That Company Asked Linus Torvalds and team, if they want to continue using their service, they have to pay for it, and they demanded a very high amount.

What Would Have Happened? It Was Really Shocking for Linus Torvalds as he was not having enough money to pay for the service.

Here Comes The Turning Point!

He Decided, to create his own VCS and named it Git and thus Git was born. This Was Such An Amazing Project as today we can witness everybody using it.

Most Importantly, Many VCSs came out since but git remained everyone's first choice!

Features Of Git:

๐Ÿ‘‰Takeup Screenshots and not differences and all this is maintained in the hidden folder named .git

๐Ÿ‘‰Almost every operation is local, which means that almost all operations are on your local system, you do not have to push it on other server and after you are done with your task, you can push your repo onto the server, it could be on GitHub, GitLab or your remote server.

๐Ÿ‘‰Git has integrity this means that not everyone who is not authorized to access your git repo can manipulate the things inside your .git folder and it will get reflected on your main project.
What git does is, it figures out the SHA-1 checksums for every changes made so that it could be verified

What does checksum means?
it is a way of verification that you have downloaded or using the same file that was sent to you by the primary source, a set of strings is generated and then checked with the file you have downloaded....if checksum is matched, means there is no changes made in the file....so, git internally calculates this checksum which ensure that no other person enters inside your .git folder and make changes...we took the discussion in some other side, hope you will like it!๐Ÿ‘

๐Ÿ‘‰Git generally adds data..obviously in majority of the cases...with time you will make changes and push them

What does saying local & remote mean?

local simply means, it is present on your personal system, you can access anything on your system without the internet while on the other hand, remote means that you are taking it from somewhere else.

GitHub:

GitHub is a hosting service. It is a website that can host your git repos..Gitlab, BitBucket are some of the other hosting service providers that can host your git repos. GitHub being the most popular.

GitHubโ€™s interface is user-friendly enough so even newbie coders can take advantage of Git. Without GitHub, using Git generally requires a bit more technical savvy and use of the command line.

Additionally, anyone can sign up and host a public code repository for free, which makes GitHub especially popular with open-source projects.

infact, you can create your own website too that can host git repos

Git repo is basically a folder, that helps us to track among the versions.

Git is a free software that can be downloaded by anyone, and you don't need to use any of these hosting service providers if you have a server, you can set remote git repositories, which we will be discussing later.

Many Newbie Developers use the concept of Git & GitHub interchangeably, Please don't do such thing! means they think that they both are same thing. But No, Git != GitHub

So, I've Already Covered Each One Of Them, but then also let us see the differences between the two.

Git Vs GitHub:

With That Set, let us End Up Here!, I hope that I was able to add some knowledge and value in your learnings through this blog!
Still Doubtful ?๐Ÿค”๐Ÿคทโ€โ™‚๏ธ Comments are always open. I will be Glad to help!

๐Ÿ‘‰This Was The Part 1 Of The Series Of Git & GitHub, Stay Tuned For the Next Blogs!

๐Ÿ‘‰Do Consider Subscribing to The Newsletter, so that you never miss an update from us!

#git #github #vcs #LearningInPublic

#HappyLearningFolks!

Did you find this article valuable?

Support Prakhar Sinha by becoming a sponsor. Any amount is appreciated!

ย