Everything else in this chapter is built out of one thing.
Commit
A saved snapshot of the whole project, with a message, an author, a time, and a link to the commit before it. Its name is a hash: a long fingerprint worked out from all of that, so identical contents always get the same name.
Committed work is the only agent work that is safe, because anything uncommitted can be overwritten by one command. And since each hash includes the hash before it, nobody can alter the past without every later hash changing, so a history can serve as evidence.
Say it to your agent
“Commit now, with only the files for this change: git add src/cart.ts src/cart.test.ts, then git commit. Show me the hash and the output of git show --stat HEAD.”