loading...

Explain Git like I'm five

twitter logo github logo ・1 min read

I've been using Subversion for 13 years. You get used to what you know. You hate other people don't use it as they should. Now everyone is transitioning to Git shortly. I love the idea of using new technologies and some of the hooks we'll be able to use with GitLab, MatterMost, and Jenkins.

I understand it's decentralized, but outside of that concept and some light syntax knowledge, I don't know much.

Explain to me like I'm five, please!

twitter logo DISCUSS (2)
markdown guide
 

Git is like a blank slate. You start a drawing and realize that you want to erase parts of it and try something else. At that point, you can go back in time and make another copy of that slate and continue working on two copies.

Later, your friends want to add their own illustrations on top of your work so they make a copy of one of your slates including your drawing and add their own artwork to it.

In the future, you and your friends might want to combine their artwork, so you could copy the art from one slate to another or make an entirely new slate with a copy of the combined artwork.

You can accomplish the above through Git.

 

I haven't used Subversion in many years so I would do you a disservice trying to explain the differences, because Subversion of today is not the same of back then.

This might help:

Imagine you are coloring on a flower-theme coloring book. You just thoroughly colored in green for the leaves and now it's time for you to get to the best part, coloring the petal. You know you enjoy red the best but it looked horrible after you finished it. With git, you can revert your choice of red in a heartbeat and you are also free to reapply the red if you change your mind. You sister came across your coloring book and she wants a piece of this. This is your coloring book and you don't trust her color-theory ability. With Git, you can grant her access to this coloring book; where she can copy the current state of your work and give it her own spin. Once she is done with it, you can accept or deny her work without affecting yours. With Git, a work doesn't have to be permanent; every action is recorded, reversible, and shareable.

I think the main difference between the two is decentralization

Classic DEV Post from Sep 30 '19

Hacktoberfest for beginners - Low hanging contribution opportunities

Matt Lancaster profile image
Husband, Father, Dreamer, Code Hacker, Six-String Slinger, Runner of Roads, and Drinker of Coffee