Git & Github. The Full Tour - Part 1

ยท

4 min read

Hi and welcome back.

So you've probably seen either of the words being thrown around and now you're wondering...what gives?

If you found your way here from the many blog posts I'm authoring then not to worry you are in the right path.

And thus the question.

What is Git and what is Github?

According to wikipedia Git is a distributed version control system that tracks changes in any set of computer files, usually used for coordinating work among programmers who are collaboratively developing source code during software development.

In lay man terms Git helps keep track of your file changes creating a hierarchical kind of a tree with timelines of changes implemented and the time it was done.

In further lay man terms for newbies who found themselves here mysteriously, picture a scenario where you're writing a really long book. Every single day you're able to jot down a couple of pages but then on some auspicious day, you decide you want to revisit the part you specifically worked on on a specific day. I know...I know, not the best of examples to give but just bear with me. Sort of like the "Goosebump series"

Goosebumps, is a thriller novel series that gives the reader an option to pick a path to follow. Most paths lead to a brutal death which will in some instance take you back to the spot where you chose a path. Multiple paths can lead to multiple ends from multiple choices made along the way.

Git enables you to do just that. Revisit and review changes made in a particular day. Back to the writing analogy and you've just gone back to that time of day. What if you want to try and experimentally write a different plot from a particular spot say for testing, without necessarily losing what you'd already written. In a weird way Git enables you to do that. You can revisit specific timeline, create "branches" that can lead to even more branches and even better you can work collaboratively on the same book with as many as hundreds of thousands of people.

Don't believe me? Here's a screenshot...

this here is a screenshot taken from the Linux repository. To the top right is a fork button with 51.1k denoted on it. This implies that over 51,000 developers are actively contributing to this project.

Can you guess the project? Linux! as in that operating system that's not mac and not windows. You knew it was open source right? People can freely download the sourcecode review it and contribute to it no? Here it is, in all it's glory!๐Ÿ˜

Git works exactly like this. With git, you're able to tag your code at every simple point in time and this simply gives you the added advantage of being able to revisit your code incase something happens. You're probably asking, what would possibly go wrong?

Assume that you're working on a large code base with a big team. You have a newbie or forget a newbie, you decided to introduce an experimental feature but then it breaks the entire application. Does it mean that you're done? Assuming that the code base you'd been working on took you an entire month or a couple of months. Leave alone that, assuming many of the developers workign collaboratively on the code base introduced the "bug".

Oh, yeah...forgot to mention that git enables you to work collaboratively with other teams, mind you on the same codebase. Can you imagine the effort it would need to work on the same codebase without git? How would you handle sharing and comparing folders shared as zipped files?๐Ÿ˜

Github

on the other hand is a platform that enables developers to host and manage their version controlled code.

A better definition goes like ~ Github is a platform and cloud-based service for software development and version control, allowing developers to store and manage their code.

It does alot more than that but how about that for an introduction to Git and Github.

To get started with Git and Github, read on to the next episode.