How “𝐠𝐢𝐭” works featuring 𝐓𝐨𝐦 𝐂𝐫𝐮𝐢𝐬𝐞
Do you know that Hollywood has spent $178,000,000 making a movie, whose plot is exactly like how git works
𝐍𝐨𝐭 𝐣𝐮𝐬𝐭 𝐭𝐡𝐚𝐭, 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:
𝐒𝐭𝐚𝐠𝐞 𝐨𝐧𝐞 you cleared it perfectly, and saved it as a 𝐜𝐡𝐞𝐜𝐤𝐩𝐨𝐢𝐧𝐭 𝐧𝐮𝐦𝐛𝐞𝐫 𝟏
𝐒𝐭𝐚𝐠𝐞 𝐭𝐰𝐨 you cleared it perfectly, and saved it as a 𝐜𝐡𝐞𝐜𝐤𝐩𝐨𝐢𝐧𝐭 𝐧𝐮𝐦𝐛𝐞𝐫 𝟐
𝐒𝐭𝐚𝐠𝐞 𝐭𝐡𝐫𝐞𝐞 you cleared it perfectly, and saved it as a 𝐜𝐡𝐞𝐜𝐤𝐩𝐨𝐢𝐧𝐭 𝐧𝐮𝐦𝐛𝐞𝐫 𝟑
Started 𝐬𝐭𝐚𝐠𝐞 𝐟𝐨𝐮𝐫, and you lost all lives in the beginning phases and 𝐆𝐚𝐦𝐞 𝐨𝐯𝐞𝐫.
𝑫𝒐𝒆𝒔 𝒕𝒉𝒂𝒕 𝒎𝒆𝒂𝒏 𝒚𝒐𝒖 𝒉𝒂𝒗𝒆 𝒕𝒐 𝒔𝒕𝒂𝒓𝒕 𝒇𝒓𝒐𝒎 𝒕𝒉𝒆 𝒃𝒆𝒈𝒊𝒏𝒏𝒊𝒏𝒈
No, you can start from those saved 𝐜𝐡𝐞𝐜𝐤𝐩𝐨𝐢𝐧𝐭𝐬
Ideally, you would start from 𝐜𝐡𝐞𝐜𝐤𝐩𝐨𝐢𝐧𝐭 𝐧𝐮𝐦𝐛𝐞𝐫 𝟑.
You went back to 𝐜𝐡𝐞𝐜𝐤𝐩𝐨𝐢𝐧𝐭 𝐧𝐮𝐦𝐛𝐞𝐫 𝟑, started stage four and you lost the lives the same way.
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.
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.
You cleared it. Game over. 𝐘𝐎𝐔 𝐖𝐎𝐍
Now, think about it, what if a software lets you do that
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, 𝐋𝐞𝐭 𝐦𝐞 𝐤𝐧𝐨𝐰 𝐢𝐧 𝐭𝐡𝐞 𝐜𝐨𝐦𝐦𝐞𝐧𝐭𝐬 𝐛𝐞𝐥𝐨𝐰 what you think? If not, I would recommend you watch it for educational purposes. If you liked the video, give it a