You can make a commit now. The next question is how much goes in one. Left alone, Claude will bundle everything you touched today into one big commit. Resist that.
A good commit is one coherent change — one idea — not “everything since lunch.”
Think of commits like chapters in a book, not a daily diary dump. If you fixed a bug, renamed a variable for clarity, and started a new feature, that’s three chapters. Smush them into one commit and nobody — including future-you — can tell where one ends and the next begins.
Why the boundary actually matters
Remember the undo from Lesson 6.8? Rolling back a commit is clean only if that commit is one thing.
Say the contact-form fix and an unrelated headline reword are tangled together in a single commit. A week later the reword turns out to be wrong. You want to undo just the reword — but you can’t, not without also throwing away the bug fix that’s riding along in the same commit. One idea per commit keeps your undo precise.
The same goes for the history you read in Lesson 4.6: a commit that says it does one thing but secretly does four is the reason some project histories are useless.
The thing that must never go in a commit
Some things don’t belong in git at all. The big one: secrets — .env files, API keys, passwords, anything you wouldn’t paste into a public chat.
This is a one-way door (you met those in Lesson 6.4). Once a secret is committed and shared, it stays in the history forever — even if you delete it in the very next commit, the old commit still has it. Treat any secret that lands in git as compromised, full stop.
The fix is a file called .gitignore that tells git which files to never track. You don’t have to write it from memory — just ask Claude: “is anything here that shouldn’t go into git?” and let it set up the .gitignore.
The Claude way
You set the boundary; Claude does the staging:
commit just the contact-form fix — leave the headline reword for a separate commit
Claude picks out only the relevant changes and commits them on their own. You decided where one idea ends; Claude handled the mechanics.
What’s next
Every commit carries a short note — its message. A good one is worth more than people think, and Claude writes them better than most humans bother to. Writing the message, next.