Chapter 3: Version control

Rebase

Moving your commits so they start from a newer point, by replaying them one at a time. The result looks as if you began today and worked in a straight line. But each replayed commit is a new commit, with a new hash.

It lets an agent's messy branch become a clean series before anyone reads it. The risk comes from the same place as the benefit: it rewrites history, so it is only safe on commits nobody else has. An agent won't know who else has them unless you say.

Say it to your agent

“Rebase this branch onto the latest main, and squash your fixups into small, ordered commits that each pass bun test. Only I am using this branch, so that is safe. Don't rebase anything already merged or pulled by anyone else.”

The workshop

Name a word, or describe what you mean in everyday language.