How Git Works? Featuring Tom Cruise

How โ€œ๐ ๐ข๐ญโ€ works featuring ๐“๐จ๐ฆ ๐‚๐ซ๐ฎ๐ข๐ฌ๐ž

Do you know that Hollywood has spent $178,000,000 making a movie, whose plot is exactly like how git works :bulb:

๐๐จ๐ญ ๐ฃ๐ฎ๐ฌ๐ญ ๐ญ๐ก๐š๐ญ, they have even featured ๐“๐จ๐ฆ ๐‚๐ซ๐ฎ๐ข๐ฌ๐ž.


Let me first explain what Git is, using an example, and then I will come back to Hollywood and Tom Cruise.

For example, if youโ€™re playing a game:

๐’๐ญ๐š๐ ๐ž ๐จ๐ง๐ž :arrow_right: you cleared it perfectly, and saved it as a ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ

๐’๐ญ๐š๐ ๐ž ๐ญ๐ฐ๐จ :arrow_right: you cleared it perfectly, and saved it as a ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ

๐’๐ญ๐š๐ ๐ž ๐ญ๐ก๐ซ๐ž๐ž :arrow_right: you cleared it perfectly, and saved it as a ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ‘

Started ๐ฌ๐ญ๐š๐ ๐ž ๐Ÿ๐จ๐ฎ๐ซ, and you lost all lives in the beginning phases and ๐†๐š๐ฆ๐ž ๐จ๐ฏ๐ž๐ซ.

๐‘ซ๐’๐’†๐’” ๐’•๐’‰๐’‚๐’• ๐’Ž๐’†๐’‚๐’ ๐’š๐’๐’– ๐’‰๐’‚๐’—๐’† ๐’•๐’ ๐’”๐’•๐’‚๐’“๐’• ๐’‡๐’“๐’๐’Ž ๐’•๐’‰๐’† ๐’ƒ๐’†๐’ˆ๐’Š๐’๐’๐’Š๐’๐’ˆ :question:

No, you can start from those saved ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ๐ฌ

Ideally, you would start from ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ‘.

:point_right: You went back to ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ‘, started stage four and you lost the lives the same way.
:point_right: Maybe the problem happened after ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ instead of ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ‘. Letโ€™s go back to ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ, do some changes to your stage number three, then start stage number four and letโ€™s see what happens. You lost all your lives the same way.
:point_right: Maybe you took a wrong turn after ๐œ๐ก๐ž๐œ๐ค๐ฉ๐จ๐ข๐ง๐ญ ๐ง๐ฎ๐ฆ๐›๐ž๐ซ ๐Ÿ instead, letโ€™s revert to checkpoint number one. Make some changes, and clear stage two. Make some changes, and clear stage three. Try stage number four.
:point_right: You cleared it. Game over. ๐˜๐Ž๐” ๐–๐Ž๐


Now, think about it, what if a software lets you do that :question:

:bulb: You guessed it right, that is what Git does. It lets you move back and forth between checkpoints. Those checkpoints are just snapshots of your code that you save as different versions. And you can go back and forth between those versions depending on your needs.

==========================
Now letโ€™s come back to Hollywood and Tom Cruise, I would recommend you go and watch the movie " ๐„๐๐ ๐ž ๐จ๐Ÿ ๐“๐จ๐ฆ๐จ๐ซ๐ซ๐จ๐ฐ ". Its plot works exactly how โ€˜gitโ€™ works.

If you have already watched that movie, :diamond_shape_with_a_dot_inside:๐‹๐ž๐ญ ๐ฆ๐ž ๐ค๐ง๐จ๐ฐ ๐ข๐ง ๐ญ๐ก๐ž ๐œ๐จ๐ฆ๐ฆ๐ž๐ง๐ญ๐ฌ ๐›๐ž๐ฅ๐จ๐ฐ :point_down: what you think? If not, I would recommend you watch it for educational purposes. If you liked the video, give it a :+1:

2 Likes

This such an intuitive way to understand how checkpoints work in Git. By the way, absolutely love the Edge of Tomorrow movie!

1 Like