DEV Community

Discussion on: Explain Git To Me Like I'm Five

Collapse
 
kallmanation profile image
Nathan Kallman

Hire 5 artists to all collaborate on painting a picture.

To let them all work at the same time; give them each a copy of the canvas.

After they've painted a small portion, have a painting machine copy their work onto one primary picture.

Copy this primary picture and give a copy to each artist. Each can paint over any part they feel needs improvement.

Again, take the primary picture and the new changes each artist has made and copy it all into a new primary picture.

If anyone feels like the picture was better before, they can look at the previous primary picture or look at each individual's work contributed. We can do this because at each step we copy onto a new canvas and leave all our previous pictures they way they were.

Git takes this idea and applies it to code. Instead of artists there are programmers. Instead of old canvases there are "commits". To track which canvases go together, there are "branches".

Collapse
 
seanolad profile image
Sean

This is probably the best explanation I could hope for. 😄