11 Git tricks for reviewing what Claude Code and Codex changed on your Mac (2026)
Your coding agent says "Done!" and the working tree now has changes in files you never mentioned. Reading that diff is the part of AI coding nobody automates for you. These are the Git tricks and Mac tools I'd use to re
Your coding agent says "Done!" and the working tree now has changes in files you never mentioned. Reading that diff is the part of AI coding nobody automates for you.
These are the Git tricks and Mac tools I'd use to review what Claude Code or Codex actually changed, keep the good parts, and throw out the rest.
Before the agent touches anything
1. Commit a checkpoint first
Run git add -A && git commit -m "checkpoint before agent" before you hand over a task. Now git diff HEAD shows exactly what the agent did, and undoing all of it is git reset --hard HEAD plus git clean -fd for any new files.
Reading the diff
2. Start with git diff --stat
Before reading a single line, see which files changed and how much. A one-line bug fix that touched nine files is your cue to ask why before you scroll.
3. Find the files it created with git status --short
New files show up as ?? and are easy to miss, since plain git diff ignores untracked files. git clean -n does a dry run listing what would be deleted, so you can see stray scripts and scratch files without removing anything yet.
4. Use git diff --word-diff for docs and config
Agents love rewording READMEs and tweaking config values. Word diff highlights the changed words inside a line instead of showing two nearly identical lines, which makes small edits in prose and YAML obvious.
5. delta for readable diffs in the terminal
delta is a syntax-highlighting pager for git, diff, blame and grep output. Install it with brew install git-delta, set it as your core.pager, and turn on navigate to jump between files with n and N. Free and open source. github.com/dandavison/delta
6. difftastic when the agent reformatted everything
difftastic compares files by syntax using tree-sitter, not line by line, so it can show what actually changed when a formatter split code across lines or wrapped it in a new block. It shows real line numbers and is MIT licensed. Try it on one diff with GIT_EXTERNAL_DIFF=difft git diff. difftastic.wilfred.me.uk
7. Kaleidoscope if you want a native Mac app
Kaleidoscope is a diff and merge app that integrates with Git, with a Changeset view for all changes between two commits (including live working-copy updates) and character-level text compare. It also diffs images and folders, which helps when an agent touched assets. 7-day free trial, plans from $8/month, macOS 15 or later. kaleidoscope.app
Keeping only the good parts
8. Stage hunk by hunk with git add -p
Git walks through each change and asks whether to stage it. Press y for the parts you want, n for the rest, and s to split a big hunk into smaller ones.
9. Throw away single hunks with git restore -p
The opposite move: discard just the changes you don't want from the working tree while keeping everything else the agent wrote. Handy for the "while I was here" edits nobody asked for.
Before you ask for another round
10. TokenBar, so a fix-up round doesn't stall halfway
Review usually ends with "fix these three things," which is another agent run. TokenBar is a menu bar app that shows usage and reset times for Claude, Codex, Cursor, Gemini and Copilot, so I can see whether there's room for that round before starting it. It doesn't give you extra quota. It's built on Peter Steinberger's MIT-licensed CodexBar and credits Pixel Agents. $5/month Basic or $15 lifetime Pro, macOS 14+. tokenbar.site
11. Open a draft PR and review it with gh pr diff
gh pr create --draft puts the agent's branch up without asking anyone to review yet. Then gh pr diff --exclude '*.lock' hides lockfile noise, and --name-only gives you the file list, the same way --stat did locally.
What's the first thing you check when an agent says it's finished?
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.