Skip to content
Skuto

Guides

Claude Code Checkpoints vs Git: Which Safety Net for AI Coding?

Published:

If you’re using Claude Code, you have two ways to undo a mistake—checkpoints (press Esc twice or /rewind) and git (commits)—and beginners often wonder which one they actually need. The honest answer is both, because they cover different ground. Checkpoints are a fast, automatic, in-the-moment undo for the AI’s edits; git is your permanent, complete history. Once you see what each does and doesn’t cover, using them together becomes obvious.

What checkpoints are good at

Checkpoints shine on speed and zero friction. Claude Code automatically saves one before each edit, so you never have to remember to. When something goes wrong, two keystrokes (Esc Esc) roll you back—and you can choose to restore just the code, just the conversation, or both. That last part is something git can’t do: rewinding the chat so the AI forgets a wrong turn.

So checkpoints win for: quick, automatic, conversation-aware undo while you’re actively working. They’re the equivalent of a generous “undo” button that’s always there without any setup.

What git is good at

Git wins on everything permanent and everything beyond the AI’s own edits. A git commit:

  • Captures all changes, including those made by commands the AI ran in the terminal—exactly the things checkpoints miss.
  • Survives the session. Checkpoints are local to your current Claude Code session; git history is forever.
  • Lets you branch, share, and review, so you can try an approach in isolation or hand work to someone else.
  • Gives you a clean diff of what changed since your last commit, which is how you actually read and trust AI-written code.

So git wins for: durable, complete, shareable history you can rely on. It’s the seatbelt; checkpoints are the quick-undo button.

The gap that matters most

Here’s the one thing to internalise: checkpoints do not undo changes made by shell commands or by anything outside Claude Code. If the AI runs a script that moves files or alters a database, rewinding restores its file edits but not the command’s effects. Git, because you committed a clean state beforehand, lets you recover from that too.

That single gap is why “use both” isn’t hedging—it’s the correct setup. Checkpoints cover the 90% of small edits instantly; git covers the 10% (and the permanence) that checkpoints can’t.

How to use them together

The workflow is simple and it’s the same one experienced people use:

  1. Commit to git before a risky or large prompt, so you have a clean baseline. (Your editor’s Source Control panel makes this a button.)
  2. Work with the AI, leaning on Esc-Esc for quick undos as you go.
  3. Review the diff of what changed.
  4. Commit again when you’re happy—your new permanent save point.

Two safety nets, each doing what it’s best at. With this in place you can let an AI agent make ambitious changes knowing that small mistakes are a keystroke away from undone, and big ones are one git command away from recovered.

You barely need to know git

If git sounds like a lot, relax: this needs only three moves—commit (save a point), view the diff (see what changed), and discard (undo)—all available as buttons in your editor’s Source Control panel. That’s the smallest amount of git that gives you the biggest safety net, and combined with Claude Code’s checkpoints, it’s all the protection most projects ever need.

Set up Claude Code the right way

Our free AI for Coders tool helps you choose the right assistant, install it for your operating system, and generate a starter rules file so the AI works the way you want from the first session. Pair a good setup with both safety nets above, and AI coding stops being scary—every mistake is either undone in two keystrokes or recovered with one commit.

Keep reading

Frequent questions

Do Claude Code checkpoints replace git? +

No. Checkpoints are a fast, automatic, session-only undo for the AI's own file edits. Git is permanent version history that captures everything—including changes from terminal commands—and survives after the session ends. They solve different problems, so the right answer is to use both.

Do I still need git if I use an AI coding tool? +

Yes, more than ever. AI tools make large changes quickly, so you want reliable, permanent save points you can always return to and share. Checkpoints help in the moment, but only git gives you lasting history, branches, and a record of what changed and when.

What do checkpoints cover that git doesn't? +

Speed and convenience in the moment. Checkpoints are automatic—Claude saves one before each edit—and they can rewind the conversation as well as the code, in two keystrokes, without you committing anything. That's friction-free undo while you're mid-task.

What does git cover that checkpoints don't? +

Everything permanent and everything beyond the AI's own edits. Git records changes from any source (including commands the AI ran), keeps history after the session closes, lets you branch and share, and never silently loses a save point. It's the durable safety net.