Sooner or later, it happens to everyone who builds things with Claude. You have a dashboard that works. One small change, a new filter or a different chart, is all you ask for. Twenty minutes on, the page won’t load and half the numbers are gone. Each “fix” from the agent only digs the hole deeper.

You ask it to put everything back the way it was, and it can’t, because it no longer knows exactly how it was.

Over the last year, AI assistants moved from a side tool to the center of daily SEO work. I rarely meet an SEO who doesn’t open Claude or ChatGPT every day. Many of us have gone further and started building with them. We make custom skills, small internal apps, dashboards over Search Console data, report generators, and whole agentic SEO workflows.

The defenses most people use are homemade. Some copy the working folder to dashboard-v3-final-WORKS. Others rely on Dropbox’s version history and hope the right file is in there somewhere.

Developers solved this problem decades ago with version control. The most popular version control system is Git, and you’ve heard of GitHub, the service where most Git projects live. I’ve written code for 20 years, and no developer I know works without version control.

Claude handles Git commands well, so an SEO who builds with an agent doesn’t have to learn them. You can use Git the way developers do, because Claude runs the commands for you.

What you need is the concept: what to ask for, and when.

What SEOs build with AI, and where it lives

Look at what has piled up on your laptop after a year with Claude. A few custom skills. A CLAUDE.md file with your audit rules. A Python script pulls Search Console data every Monday. A dashboard joins GSC and GA4. Client audits sit in a Markdown folder, three people keep editing one redirect map, and you’ve tuned a prompt library for months.

Usually, nothing protects it. These files sit in one folder on one disk with no history. A Google Doc saves every version on its own, but a folder on your Mac doesn’t. An agent can rewrite twenty files in a minute. If it deletes the wrong directory, or you do, the work is gone.

Why the agent’s own undo isn’t enough

You can ask Claude to undo its own changes, and sometimes it works. Without version control, the agent has no saved copy. It rebuilds the old version from what it remembers of the chat. In a short session, that often goes fine. Long sessions break this. After an hour of edits, or a compaction, the agent works on files it no longer has, so you get a near copy of the original.

An AI agent redraws a dashboard from memory and gets a near copy, while a saved commit gives back the exact original

Claude Code usually doesn’t capture changes you make by hand outside it. It also cleans up old checkpoints after about 30 days. Keep using version control such as Git for permanent history and collaboration. Anthropic’s checkpointing docs say checkpoints are only for quick recovery within a session.

What Git is

Version control records every change to the files in a folder, so you can see what changed, when and why, and return to any earlier state. Git is the most widely used version control system. GitHub is a service that stores Git projects online.

Git works on a simple idea. You point it at a folder, and from then on it tracks every change in the text files inside.

When you reach a state you want to keep, make a commit: a snapshot of every file right then, plus a short note on what changed. Commits line up into a history, and you can jump to any point in it whenever you need to. That’s the time machine.

Three commits on a timeline, first dashboard, add GA4 tab and fix date filter, and an arrow from a broken dashboard back to the last commit

Nothing changes in how you work with files. The folder looks the same in Finder, the files open in the same editors, and Claude reads and writes them as before. Git keeps the whole history in a hidden .git folder inside the project.

Unlike checkpoints, Git doesn’t care who changed a file or how. It stores the exact content of every commit. That lets it bring back the dashboard from three weeks ago byte for byte. It doesn’t matter which agent, script or person broke it since.

A model is stateless, so a new session starts with no memory of yesterday’s work. A project with a clean commit history gives the agent a logbook. Claude Code reads the current branch and the latest commits when a session starts. Ask what changed last week, and it reads the history instead of guessing.

You decide when to save a version and what to roll back; the agent runs the commands.

The words you’ll see in Claude’s replies

You don’t need to memorize commands, but these terms will appear in Claude’s answers. Knowing them helps you write sharper prompts.

The Git words you’ll see in Claude’s replies

You ask in plain words. These terms come back in the answers.

TermWhat it meansWhere you’ll meet it
Saving versions
Repository (repo)A folder Git tracks, together with its full history“Set up Git in this folder” creates one
CommitA saved snapshot of the project with a note about what changed“Commit this version”
.gitignoreA file that lists what Git should never trackSystem files, data exports, credentials
History (log)The list of commits, newest first“What changed this week?”
DiffThe exact lines added and removed between two versionsClaude shows it before and after edits
Going back
RevertA new commit that undoes an earlier one, so the history stays intactRolling back a change that broke something
RestoreBringing files back to how they were in a commitThrowing away a failed experiment
Working in parallel
BranchA parallel line of work that starts from the main versionTrying something risky without touching the stable version
MergeCombining two lines of work into oneFinishing a branch, or joining a colleague’s edits with yours
ConflictTwo edits to the same lines that Git can’t combine on its ownTwo people changed the same paragraph
Backup and sharing
RemoteA copy of the repository somewhere else, usually GitHubBackups and teamwork
Push / pullSending your commits to the remote / getting new commits from itSyncing between computers and colleagues

When Git makes sense in SEO work

The clearest case is anything that runs: internal dashboards, scripts that pull GSC or crawl data, small tools for the team. It’s just as useful for your skills library and for client work you keep as text, like audit drafts, content briefs, redirect maps and robots.txt drafts. When a redirect map passes through three people, Git shows who changed which line and when.

The rhythm is simple. You built an app, it works, it’s stable: that’s a commit. You added a feature, it works, you like it: another commit. You tried to rework the dashboard and you’re not happy with the result? Go back to the last commit and try a different approach.

That last case changes how you work with an agent, because experiments become cheap. Without a safety net, you hesitate to ask for a big change to something that works. With one, a failed attempt costs you a single prompt to undo.

How to organize your repositories

The biggest question is always the same: one big repository for everything, or many small ones? For most SEO work, I’d choose one repository per project, even though both options work and your workflow decides the answer.

One big repositoryOne repository per project
SetupOne folder, one history to manageMore folders to keep track of
SharingYou share everything or nothingYou give each person exactly the app or client they need
HistoryEvery project’s commits mixed into one logEach log tells one project’s story
Rolling backTakes care, so you don’t roll back other projects tooRoll back freely
Fits bestPersonal notes, a solo skills libraryApps, client work, anything you share

In practice:

Git works best with text: code, Markdown, CSV, JSON, HTML. It can store images, videos, PDFs, Excel files and zip archives, but it can’t show what changed inside them. Binary files barely compress, so each edited version adds close to its full size to the history for good. Leave them out unless the project actually uses them, like a logo the dashboard displays.

GitHub warns about files over 50 MiB, blocks files over 100 MiB, and recommends keeping a repository under 1 GB (GitHub docs).

GitHub’s size limits

Commit the script that produces a data export, not the export.

50 MiBA file over this size gets a warning
100 MiBA file over this size is blocked
1 GBThe repository size GitHub recommends staying under

Source: GitHub Docs, About large files on GitHub, November 2026

Large data exports are text, but they rarely belong in the repository either. A full crawl export can easily pass the 100 MiB limit. Commit the script that produces the export and leave the data out.

One big folder holds the dashboard, skills and a client with one mixed history; one repository per project gives each its own history

How we keep the EdgeComet blog in Git

Our whole blog lives in one Git repository. Each article gets its own subfolder, which holds the outline, the research materials, the draft, and separate LinkedIn and Twitter files. For content, we went with a single repository, because the same team writes all of it and every article follows the same structure. Here’s the layout, with this article’s folder as it will look once it’s published:

TEXT
content/
  CLAUDE.md          formatting and chart rules
  persons/           a writing style guide for each author
  new-articles/
    15-git-for-seo/
      outline.md
      research1.md
      article.md
      linkedin.md
      twitter.md
      images/

Claude reads the CLAUDE.md file and the author’s style guide before it drafts from an outline. Every draft starts from the same rules, and nobody pastes them into a chat.

Everything for an article sits in one place instead of being spread across hundreds of Google Docs, and it’s easy to browse.

The history tells you when we drafted each piece and which research we used. It also shows what changed between the outline and the published version. Say an article needs an update months later. Claude reads the folder and its history, so it knows what we worked from originally.

When the article is ready, Claude uploads it to WordPress. Git covers the folder only up to that point. It works because one team writes everything in one structure.

Example: a Search Console and GA4 dashboard, step by step

Imagine you want a dashboard that pulls Search Console and GA4 data for a client site. Here’s how Git fits in from the first minute.

1. Set up Git before you write any code. Create an empty folder, open it in Claude Code, and start with something like:

TEXT
Set up Git for this project. It will be a Python dashboard that pulls
Google Search Console and GA4 data. Create a .gitignore first: keep out
macOS system files, the data/ folder, .env files and any Google credential files. Show me the .gitignore before you commit anything.

Claude will ask a couple of questions, like your name and email. Git stamps every commit with an author, so later you and your colleagues can see who made each change. If Git isn’t installed on your computer yet, Claude will tell you and walk you through the installation.

Claude Code explains the new .gitignore, asks for a name and email because Git has none set, then makes the first commit

2. Build the first version, then commit it. Work with Claude as usual. When the dashboard runs and shows the right numbers:

TEXT
The dashboard works. Commit everything with a message that describes
what this version does.

3. Add features one at a time. Each working feature gets its own commit. Take a new tab that shows Googlebot and AI bot hits from an EdgeComet MCP export. Git ignores data/, so the CSV lives there; the reading code gets its own later commit.

4. Experiment, and roll back when it doesn’t work. Now you ask for something bigger, like a redesign of all the charts, and you don’t like what comes back:

TEXT
I don't like the new chart design. Show me everything that changed since
the last commit, then discard those changes and bring the project back
to the last commit.

Ask to see the changes first. Uncommitted changes that you discard are gone for good, so it’s worth a look before they go. If the bad change is already committed, ask Claude to revert that commit instead; the history keeps both the mistake and the fix.

Claude Code saves a copy of the redesign, brings the project back to the last commit, then lists everything that changed since that commit

5. Push it to GitHub. A copy on GitHub means the history survives your laptop:

TEXT
Create a private GitHub repository named client-dashboard and push this
project to it.

Claude needs access to your GitHub account for this. The simplest route is GitHub’s official command-line tool: Claude can install it and walk you through a one-time login in the browser.

6. Use the history later. A month from now, when a number looks off:

TEXT
Read the Git history and tell me what changed in the data processing
over the last month. Did anything change how clicks are counted?

Common mistakes

Committing files that don’t belong

Git reads a file called .gitignore that lists names, folders and patterns it should never track. Set it up before the first commit. If you add a file to .gitignore later, Git still keeps it in commits you’ve already made.

What goes there? System files first: .DS_Store on a Mac, Thumbs.db on Windows, editor folders like .idea/ and .vscode/. Add the dependency folders. Claude creates them when it installs libraries. Also add credentials, raw data, archives and media. A typical starting point for an SEO project:

TEXT
# System and editor files
.DS_Store
Thumbs.db
.idea/
.vscode/

# Libraries Claude installs
node_modules/
.venv/
__pycache__/

# Credentials
.env
*credentials*.json
service-account*.json

# Data, archives and media
data/
exports/
*.zip
*.mp4
*.jpg
*.png

You don’t have to write it yourself. Ask Claude for a .gitignore that fits your project, then read it before the first commit.

Committing secrets

This is the most expensive mistake on the list. A Search Console dashboard needs credentials. These can be a Google service account key, an OAuth token, or an API key in a .env file.

Deleting the file in the next commit won’t help if one of them lands in a commit, since the earlier commit still holds it. Once you’ve pushed it, treat it as exposed.

Three commits: first version, add .env with a key, delete .env; the key is still in the second commit's snapshot

GitHub’s guidance on sensitive data puts revoking or rotating the credential first, before any cleanup of the history. Keep credentials in files your .gitignore covers, and ask Claude to check the changes for anything that looks like a key before each push.

Committing too often, or too rarely

There’s no need to commit every single file edit during the implementation. Two hundred commits called “fix” also tell nobody anything. If you commit hundreds of files once a month, your only way back is to a month-old state. That doesn’t help either.

Commit at any point you may want to revisit. A working feature counts, and so does a finished fix or the state right before a risky change. Remember the logbook: a clear message about what changed and why helps your agent understand the project in every new session.

Asking for a big change on top of uncommitted work

Git protects only what you’ve committed. If you spent the afternoon tweaking the dashboard and then ask the agent for a large rework, everything since the last commit has no safety net. Commit first, then ask.

Letting the agent rewrite history

Some Git operations throw work away: a hard reset discards uncommitted changes, and a force push overwrites the history on GitHub. Agents sometimes reach for them while trying to clean up a mess. By default, Claude Code asks for your approval before it runs commands that change your files or history. Keep that default for Git. When Claude proposes one of these operations, ask what you’ll lose before you approve it.

Making a repository public by accident

GitHub asks whether a new repository should be public or private. For client work and internal tools, the answer is private, every time. Anyone can read a public repository, and automated scanners comb public GitHub for leaked keys.

Keeping repositories in Dropbox or iCloud

Sync services and Git both manage the files inside .git, and they can step on each other, leaving conflicted copies inside the history. Keep repositories in a regular folder and let GitHub be the copy in the cloud.

GitHub: the copy that survives your laptop

A local repository keeps the history on one disk. If the folder gets deleted or the laptop dies, the code and its history disappear together.

GitHub stores a copy of your repository online. You push (sync) your commits to it, and you pull them on another computer, a server or a colleague’s laptop. A colleague who clones the repository gets a full copy with the entire history.

Private repositories have been free since January 2019. Since April 2020, free accounts can add unlimited collaborators to them. Turn on two-factor authentication on the account that holds client work.

GitLab and Bitbucket offer the same basics if your company already uses one of them.

Advanced: teamwork and branches

Git is a professional tool, and it has more to offer once the basics feel natural.

Working on the same files together

When you work on an application or client materials with colleagues, everyone can work in the same repository, and Git merges the text. You edit the top of a file and a colleague changes a couple of lines at the bottom. Git combines both edits into one file.

Only when you both change the same lines does Git stop and report a conflict, with both versions shown side by side. Claude resolves conflicts well, but ask it to show you both versions and explain the difference before it picks one.

Branches

By default, a repository has one main line of history, usually called main (older projects call it master). A branch is a parallel line that starts from it. Create a branch for a new report layout and work there for days. Main keeps the stable version your team relies on. If the experiment works, merge it back. If it doesn’t, delete the branch, and main never knew it existed.

A new report layout branch leaves main, holds two commits of its own, and merges back while main keeps its stable commits
TEXT
Create a branch called new-report-layout and switch to it. We'll try the
new design there and keep main untouched.

On GitHub, a pull request adds a review step: a colleague looks through the changes on a branch before they reach main.

FAQ

Do I need to learn Git commands?

No. Learn the concepts from the table above: commit, history, revert, branch, push. Claude runs the commands; your job is to decide when a version is worth saving and what to roll back.

Isn’t Dropbox or Time Machine history enough?

They save versions by the clock, file by file. Git saves a snapshot of the whole project at the moment you say it works, with a note about what changed. When one agent session touches fifteen files, finding the fifteen matching old versions in Dropbox is guesswork. In Git, it’s one commit.

Is it safe to keep client work on GitHub?

Private repositories, per-person access and two-factor authentication cover the basics. Keep credentials out of every repository. If a client’s contract limits where their data can be stored, check it before you push raw data anywhere.

Can Git track Google Docs or Sheets?

No. Git tracks files in a folder on your computer. To put a document under version control, keep it as Markdown or CSV in the project folder. Documents that stay in Google already have Google’s own version history.

Conclusion

The best thing about Git is that you barely see it. Git works behind the scenes as you work with Claude, and it gives the agent a time machine. That means safe rollbacks, the full project history, and a logbook to read at the start of every session.

In SEO workflows, you can experiment with dashboards and skills without fear. You can also see who changed what in client files, and a remote copy survives a lost laptop.

The habits that matter most: