By the end of this page you will know exactly what a save point captures, and why one tiny detail on it makes everything else possible.
In lesson 1 you met the problem: files change, and a folder full of final_v2_REAL copies is not a system. Git's answer is the save point.
Here is the single most important thing to know about it. When git takes a save point, it does not save just the file you were editing. It photographs every file in the project at that exact moment. Your code, your notes, your to-do list, all of it, frozen together. One picture of the whole project as it stood at 3:42 pm on a Tuesday.
And once a photo is taken, it is glued into the album. Deleting a file tomorrow does not harm the photo you took today. This is why saved work in git is almost impossible to lose.
A photo alone is not enough. Imagine flipping through 500 nearly identical photos of the same folder. Which one had the working login page? No idea.
So git staples a sticky note to every photo. The note holds exactly three things:
Items 1 and 2 are handy. Item 3 is the magic one. Because every photo points back to the photo before it, the photos link up into a chain, and that chain is your project's entire history. Lesson 3 is built on this one idea, so tuck it away somewhere safe.
That dashed arrow, the "photo just before" line, is the thread that will turn loose photos into a proper album.
Fair question. Five hundred photos of the whole project sounds like five hundred full copies of everything. It is not: under the hood git is clever and quietly stores only what is actually new, so your disk is fine. You do not need to think about how. Keep the simple picture in your head: every save point is a photo of everything.
You now understand the idea completely: a photo of every file, plus a sticky note. Time to learn what git calls it.
One more thing is stamped on every photo: a receipt number. Git generates it automatically, and it looks like random letters and digits: f30f6b7.
That is exactly what they look like in real life. Once you start taking save points of your own, git will stamp a number like that on every single one, automatically.
f30f6b7. It is just a name, like a receipt number or an order ID. You never memorize one, and you never type more than those first few characters.Why does the receipt number matter? Because messages can repeat. The ID cannot. It is how git, and you, point at one exact photo with zero ambiguity.
You will write thousands of these notes over the years. Six months from now, the note is the only clue about what a photo contains. A tiny habit today pays off forever.
Bad notes say nothing. Good notes describe the change so clearly that future you never has to open the photo to check.
# Notes that help nobody, including future you stuff fix asdf # Notes future you will be grateful for Fix login button overlapping logo on phones Add the May pricing table to the docs Remove the broken newsletter signup form
Here is the rule of thumb. Your note should finish this sentence: "If you apply this commit, it will ..." "Fix login button overlapping logo on phones" completes it perfectly. "stuff" does not. That is the whole test.
Q. What does a commit contain?
One more. Two commits in two different projects could both have the message "fix typo." How does git tell commits apart?