The thing that made me comfortable letting an AI edit my code wasn’t a better model. It was knowing that every edit lands as a git commit I can read — and reverse. Here’s the exact routine I run with Aider, the open-source terminal pair programmer.
Before the session
- Commit or stash my own work first. Aider's auto-commits are only cleanly separable from my changes if my tree starts clean.
-
One config change:
dirty-commits: falsein.aider.conf.yml, so Aider never commits my uncommitted files for me before it starts editing. - One branch per task, named for the task. AI commits on a task branch are cheap to squash, rebase, or abandon wholesale — and Aider never works directly on my deployment branch.
During the session: the review routine
Every AI change, no exceptions:
-
See the change, don't trust the summary.
/diffshows what actually changed since the last message. - Read hunks, not vibes. Especially deletions, changes to tests, and anything touching config, auth, or data handling.
- Run the tests myself at least once per session — even with auto-test on. Trust, but verify with my own hands.
-
Skim the log afterwards:
git log --oneline, andgit showanything I didn't watch happen.
When it goes wrong: the undo ladder
Least to most drastic:
-
/undoin chat — undoes the last commit if Aider made it. First resort for "that edit was wrong". -
git revert <hash>— for a later bad commit when earlier ones were fine. Safe and history-preserving, so it works on shared branches. -
git reset --hard <good-hash>— local-only history, destructive to everything after it. Only when I'm sure. -
Edited files in my editor mid-session?
/commitcommits those outside edits with a generated message, keeping the timeline coherent.
That's the whole system: clean tree in, diff review during, undo ladder in my pocket. The AI can be fast because the recovery is boring.
This routine is one chapter of a $10 pack I put together — the full Git safety guide, six workflow playbooks, a cost-control guide, and my templates (checklists, task brief, full .aider.conf.yml): https://whop.com/checkout/plan_Qnb9d21JZ7LEa
My previous post covered all six workflows: https://dev.to/workflownexus/6-repeatable-aider-workflows-and-the-git-routine-that-makes-them-safe-3ffl — and if Aider isn't installed yet, start with the free Starter Kit: https://whop.com/checkout/plan_diZ6ymgxjRMz2
How do you review AI-generated commits? Curious what other people's routines look like.
Top comments (0)