Prefer to watch? This chapter goes with Episode 4 (5:09). Open it on YouTube.
git --version in PowerShell or Terminal. If it is missing, download Git from its official site. (Git is not GitHub: this chapter needs no GitHub account.)A big change you did not want
Before a big rewrite of your resume, you save a copy called resume-old. If the new one reads worse, you open the copy, and you are back. Today we look for that copy in Claude Code.
So far every change was small. Now ask for a big one, in four words.
How do you get your project back exactly as it was, and how do you never lose a version you liked?
First, see what changed
Before undoing, look. Claude Code has a command that shows every change.
/diff needs git, and our project has none yet. Remember this line; we set up git below.Rewind, and where it stops
We met rewind in chapter 3. Press Esc twice and pick the message before the makeover.
Now refresh the page.
Why? Look at how Claude worked. It changed the header with its edit tool. But it put most of the new style in with a shell command.
Claude changes files in two ways. With its own edit tool, rewind can undo it: the logo went back. With a shell command, rewind cannot: the colours stayed.
So rewind is a good undo for Claude's own edits. It is not a safety net for the whole project. I had a copy of the old index.html, so I put it back by hand. Without a copy, you would ask Claude to repair it, and hope.
That copy should not depend on luck. That is what git is for.
Keep every version with git
Git keeps a saved copy of your project each time you say "this works". Each saved copy is called a commit. You do not need to know the git commands yet. Ask Claude.
.gitignore: the list of files git must never save. Your tasks stay private. Note the honest line: which you didn't ask for.Git needs your name and email for every commit. If Claude says they are not set, run these two lines once, with your own details.
Commit with one command: a plugin
Committing well means a good message every time. Anthropic publishes a free plugin for that. Plugins add ready-made commands to Claude Code, like installing an app on your phone.
Now make one small change, then commit it.
/commit and the plugin's three commands appear. We use the first.
! git log --oneline shows our two commits. The grey line is only a suggestion.What git costs
Git only keeps what you commit. A change you never committed is as unsafe as before. So commit each time something works, in small steps.
Two habits: commit before a big change, and write a short message each time. In return, every change has a way back.
And a commit says the code runs. It does not say the code is right. In chapter 5 the streak looks right, passes our eyes, and is still wrong.
Quick reference
The prompts from this chapter, ready to copy: every prompt, chapter 4.
| Command or key | What it does | Use it when |
|---|---|---|
/diff | Shows what changed since the last commit | You want to see what Claude touched (needs git) |
Esc Esc | Rewinds to an earlier message: code, conversation or both | You want to undo Claude's last steps |
Restore code and conversation | Puts files and the chat back as they were | Both the change and the talk about it should go |
Set up git for this project … | Claude runs git init, writes .gitignore and makes the first commit | Your project has no history yet |
/plugin | Opens the plugin manager: discover, install, manage | You want a ready-made set of commands |
/commit-commands:commit | Writes a commit message and commits your changes | A change is done and works |
! git log --oneline | Lists your commits, newest first | You want to see your history |
Your project, a big change, and a way back
The goal: undo a big change in your own project.
The steps: in your own project, ask Claude to set up git and make a first commit. Then ask for a big change you may not like, and undo it. (For an extra: ask Claude to change the Add button to bright red, do not commit, then type Throw away all changes since the last commit.)
Guess first: will rewind be enough, or will you need git?
One question for you, the same as in the video: what was the last change you wished you could undo? And how often would you commit while building with Claude?
References
Where each command and behaviour on this page comes from. Every screenshot is from our own recording on 29 Oct 2026, Claude Code 2.1.312.
- Anthropic · Checkpointing Esc Esc rewinds code and conversation; changes made by shell commands are not tracked, so they are not undone. https://code.claude.com/docs/en/checkpointing
- Anthropic · Discover and install plugins /plugin, the official marketplace claude-plugins-official, and install scopes. https://code.claude.com/docs/en/discover-plugins
- Git · git-scm.com, the Git documentation What a commit, git log and .gitignore are. https://git-scm.com/doc
- My own recording · 29 Oct 2026, Windows 11 Rewind undid the edit-tool changes but not the shell command, so half the makeover stayed.
New chapters and episodes come out every week. Follow along on YouTube or the WhatsApp channel. Questions? Ask under the video on YouTube; I read every comment.