What is GIT for a five year old ?


GIT is a revision control system. As per Wikipedia definition –

Git is a distributed revision control and source code management (SCM) system with an emphasis on speed. Every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server.

But for a complete beginner who wants to understand GIT in leyman terms, the above does not makes sense. Infact how will you explain this to a five year old ? Well this is not an interview question 😉

During my earlier days of programming, I too used to wonder what is GIT and what exactly is Github. I even didn`t knew the difference between GIT and Github. After going through few forums, I found one answer that I was looking for –

Imagine you’re making a sandwich. Let’s also imagine you have a fancy refrigerator called Git that can make special copies of each step of your sandwich making places on an infinite number of shelves.

  • You start with two slices of bread and add it in Git. Git now contains two slices of bread on one of it’s shelves.
  • You add a slice of cheese to your sandwich and also add it to Git. Git now contains a slice of cheese on the shelf just above the last shelf.
  • You add a slice of ham lettuce and add it to Git. Ham and lettuce sits on a shelf.
  • You add ketchup. ketchup sits on a shelf.

But wait, putting ketchup was a mistake so you go into Git and get the sandwich as you built it up to step 3. So now you’re back to the sandwich with no ketchup and now you can put the correct condiment, mustard. Rolling back this way is much better than scraping the ketchup off because you might miss some of it.
Git also has the ability to keep the sandwich as is but also let you experiment on another copy (Forking). It’ll store this fork on a new set of shelves beside your ‘main’ shelf.

So I guess the above paragraph clearly explains Git to a small kid 🙂

The other question is that why should you use Git ? Well after searching here and there I landed up at a Comic book style explanation ( link below ) which explains everything to an extent.

Link to the comic book – http://jaisonjustus.github.io/#/post/2/git-comics-part-one

Leave a Reply

Your email address will not be published. Required fields are marked *