Skip to content
All guides
Guides Review your agent's work See changes with Git

See changes with Git

Your agent edits real files in your workspace. Git is the tool that quietly records every version of those files, so you can see exactly what changed, and undo it if you don't like it. You already installed it during setup — now we'll actually use it.

You don't need to memorize commands. We'll start by turning your workspace into a repo (your agent does this for you), then cover the two easiest ways to review changes: right inside your coding tool, or in a friendly desktop app.

Why this matters

When an agent rewrites a note, reorganizes your knowledge base, or edits a planner, you want to trust but verify. Git gives you a clear before-and-after and a reliable undo button. It turns "I think it changed something?" into "here's exactly what changed, and here's how to put it back."

A tiny bit of vocabulary

Four words cover almost everything you'll do. You can come back to this list anytime.

Commit

A saved snapshot of your workspace at a moment in time, with a short note about what changed. Think of it as a checkpoint you can return to.

Diff

The list of exactly what changed between two snapshots — which lines were added, removed, or edited, in which files.

Revert / restore

Undo a change by going back to an earlier snapshot. Nothing is truly lost as long as it was committed.

Repository (repo)

The workspace folder plus its full history of commits. Your agent's home folder is a repo.

First: turn your workspace into a repo

Git only records history once a folder has been set up as a repository. If you've never done this, your workspace probably isn't one yet — and that's fine, because your agent can do it in one step. In your conversation, just ask:

1

Ask your agent to set up Git

Set up this folder as a Git repository if it isn't one already, then make an initial commit of everything.

It will initialize the repo and save a first snapshot. From now on, every edit it makes can be seen and undone. You only need to do this once per workspace.

Already pushing to GitHub or using cloud agent sessions? Then your workspace is already a repo and you can skip this step.

Option 1: review changes right in your coding tool

Your coding tool (the "harness" your agent runs in) already speaks Git. You can see exactly what changed without leaving the app — and commit or push from there too.

1

Read the diff inline

As your agent works, the harness shows the edits inline in the chat — added lines in green, removed lines in red — so you can read along as files change. After it finishes, it lists the files it touched. You can also just ask:

Show me what you changed since my last commit.

It will summarize the edits in plain language and show you the exact diff if you ask for it.

2

Review changes in the sidebar

Most harnesses also collect every changed file into a panel you can scan and open one at a time — often with a one-click Review or Undo next to each. It's the same before-and-after view, just gathered in one place. Expand the example for your harness below.

In Codex
In Claude Code
3

Commit and push from the chat

When you're happy with the changes, ask your agent to save a snapshot — and, if you've connected GitHub, to back it up off your machine:

Commit these changes with a short message, then push to GitHub.

Not on GitHub yet? Leave off "push" — committing alone still saves a checkpoint on your computer. See Back up and share with GitHub to set up pushing.

Option 2: just ask your agent in plain language

1

Ask what changed

The harness already speaks Git. In your conversation, you can just say:

Show me what you changed since my last commit.

It will summarize the edits in plain language and can show you the exact diff if you ask for it.

2

Ask for a checkpoint before big work

Before letting it reorganize something important, ask it to save a snapshot first:

Commit everything first, then reorganize my knowledge base.

Now there's a clean point to return to if you don't like the result.

3

Ask it to undo

If you want to roll back to that checkpoint, say so plainly:

Undo your last changes and go back to my last commit.

As long as you committed first, your earlier version is safe.

Option 3: use a desktop app

If you'd rather see and click rather than type, GitHub Desktop is a free, friendly app that shows your changes visually. It's the same tool whether or not you ever use GitHub itself.

1

Install GitHub Desktop

Download it for Mac or Windows and install it. You can skip signing in to a GitHub account for now if you only want to view local changes.

Download GitHub Desktop
2

Add your workspace folder

Choose File → Add local repository and select your agent's workspace folder — the same one with files like AGENTS.md and MEMORY.md. It opens as a repository.

3

Read the changes

The Changes tab lists every file your agent has touched since the last commit. Click one and you'll see the diff side by side — added lines in green, removed lines in red. The History tab shows past commits the same way.

4

Save a checkpoint or undo

To save a snapshot yourself, type a short summary at the bottom left and click Commit to main. To throw away changes you haven't committed, right-click a file in the Changes list and choose Discard changes.

The one habit worth keeping: commit often. A snapshot every time you're happy with where things are means undo is always cheap and safe. Your agent is glad to do it for you whenever you ask.

Next: Keep a backup off your machine

Git keeps history on your computer. To back it up somewhere safe and unlock cloud agent sessions, push it to a private repo. See Back up and share with GitHub.

Stuck or need help?

Send a message and it comes straight to me. Tell me where you got stuck and I'll write back.

Rather have it done for you?

If following the steps yourself isn't how your brain works today, that's fine. On a Zoom call you share your screen and hand me control, and I set it up for you, right there on your own computer. You watch it come together and end the call with a working setup, nothing left on your plate.

Pick a time below. No pitch, no pressure, no homework beforehand.