Skip to content
English
Level 8: Git the Claude Way
Lesson 1 · +10 XP

What a commit really is

Want to see commits, branches, and merges before reading about them? Try the interactive preview → — make four commits and a merge by typing in your browser. The whole loop, visualized.

Back in Lesson 6.8, you met git as an emergency undo: git status to see what changed, git checkout to roll a file back. That only worked because there was a commit to roll back to. This level is about making those commits on purpose — and the whole workflow that’s built on top of them.

A commit is a labeled snapshot of your entire project at a moment in time — one you can always return to.

It is not the same as saving a file. That distinction is the whole lesson.

Saving overwrites. Committing stacks.

When you save a file (Cmd-S, Ctrl-S), your computer writes the latest version to disk and forgets the old one. The previous version is just gone.

A commit doesn’t overwrite anything. It freezes the whole project as it is right now, keeps that frozen copy forever, and stacks it on top of all the previous frozen copies.

Here’s the analogy that makes it click:

  • Saving is writing over a page in pencil. The new words replace the old ones.
  • Committing is photocopying the whole notebook, dating the copy, and filing it. Tomorrow’s copy doesn’t erase today’s — you can pull any copy back out, in order, forever.

That stack of copies is the project’s memory. It’s exactly the history you learned to read in Lesson 4.6 — the log of commits, each with a message, that you can ask Claude about. Now you’re the one adding to it.

How you actually make one — the Claude way

You don’t need to memorize the commands (git add, then git commit). The move is:

  1. Look at what changed — git status, just like Lesson 6.8.
  2. Tell Claude: “commit this.”

Claude runs the plumbing. What’s yours is the judgment call underneath it: deciding that this moment — this working state — is worth bookmarking. That’s the part no tool can make for you, and it’s the thread running through this whole level. Mechanics to Claude; judgment to you.

What’s next

Now you can make a commit. The question nobody warns you about: how much should go into one? Claude will happily stuff your entire afternoon into a single commit if you let it — and that’s usually a mistake. Next.