DEV Community

Anurag Gharat
Anurag Gharat

Posted on

Explain Git to a 5 year old!

So imagine you are working on a painting. You started the work on Monday and by the end of the day you made pretty good progress on it. Now the only thing left is adding some colors and some final touch up. So you decide to do it next day.

Next day you wake you and resume your work. Unfortunately while working you spill the bottle of water color on your painting and now the entire painting is destroyed. You can’t do anything about it, than to start over again!

Here at this point you must be thinking what if I could

  1. Go back in time and resume my work before the water color gets spilled?
  2. Go back to yesterday and create a exact copy of completed work so that even if I mess up one, I have another copy to carry on my work.

But this would only be possible if you had a Time machine! But neither of us knows Tony Stark or Bruce Banner who could let us borrow their time machine from Avengers Endgame!!

Git is like a time machine

So Git is nothing but a time machine! Not for your Painting, but your code!

Git allows us to create

  1. Create stops(commits) in your project
  2. Reset your project to any of these previous stops.
  3. Create copies of your project and carry on your work separately
  4. Merge these copies whenever required.

Isn’t Git amazing?

If you go by the definition, Git is a Version Control System. That is, a System that lets you manage and control the version of your project.

Whereas GitHub is a platform by Microsoft that uses Git to manage your projects.

I hope I was able to explain what is Git in simple terms for you!

Top comments (0)