StoicBuilder

HandbookIII the CastraGit commits

IIIthe Castra, Stay in control

Git commits

1 min readUpdated 28 November

In plain words

A commit is a named snapshot of your project's files at one moment, so you can see what changed and return to it later.

Where you see it

Connect Lovable to GitHub and every edit shows up there as a commit with a message like "Update NoteList.tsx". In Cursor or Claude Code, the agent runs git commit when you ask it to save your progress.

Terminalterminal
$ git add .$ git commit -m "Save a note when you press Enter"$ git log --onelinea41c9e2 Save a note when you press Enter7d03b18 Add the notes list page
Each line in the log is a point you can go back to.

What goes wrong

  1. Working for hours without a commit

    When the agent breaks something late in the day, there is no earlier checkpoint to return to. Commit every time the app works.

  2. Messages that say nothing

    A week later, "fix" and "update" won't help you find the change that broke checkout. Say what changed and why.

    git commit -m "fixes"
  3. Committing the .env file

    Your keys are now in the history and stay there even if the next commit deletes the file. Add .env to .gitignore before the first commit.

What to tell your agent

Copy this into Lovable, Bolt, Cursor or any agent
Commit after every change that works, with a one-line message saying what changed and why. Check that .env is listed in .gitignore before committing, and show me the output of git log --oneline -5 when you're done.

Quick check

Sign in to earn +10 XP for it

The agent's last three edits broke Quill, and you can't tell which one did it. When should you have committed?

Got a prompt that touches git commits?

Paste it. You get a better prompt first, then the cards that explain it.

Check your own prompt

Free, no sign-up.