Lesson 3 · about 25 minutes
Keep every version, and undo in one step
Every change to your app gets saved, with a note saying what changed, in a private place online called GitHub. If something goes wrong after you put it live, you step back to the version before. Nothing is ever lost.
Git for history from day one, a private GitHub repository as the backup, and deploys that run from GitHub after the tests pass. Plus rollback when a release goes wrong.
Git from the first file, and a private GitHub repo as the backup. Deploys run from GitHub, through Workers Builds or GitHub Actions, after the tests pass, and wrangler rollback undoes a bad release. Once merging to main puts the app live, the agent asks before every merge.
- Say "Nice one!" after 10 tapsToday, 14:02
- Bigger tap buttonYesterday
- Sprout icon for the home screenTue
- First versionMon
The green one is live. Try undoing a release.
What you'll make
- Your app's history, saved off your computer
- A note for every change, in plain words
- Putting it live from GitHub, with tests first
- A one-step undo for a bad release
You'll need: the app from lesson 2 (or any app folder), and an email address for GitHub.
Why keep versions
Without history, a change that breaks something is hard to undo, and if your computer dies, so does your app's code. With history you can always see what changed, when, and go back.
Think of it as "track changes" for your whole app, with a backup copy kept safely online.
Every change saved with a note
Your agent saves a snapshot after every working change, called a commit, with a short note. With the skill installed it does this as it goes. Check it's on:
- Say "Nice one!" after 10 taps
- Bigger tap button
- First version
Behind the scenes: git init once, then git commit per change. Secrets stay out (.dev.vars and .env are ignored).
Make a free GitHub account
Go to github.com/signup. The free account is all you need, and private repositories are included.
Then let your agent use it:
It uses a small tool called gh. A browser window opens with a short code to confirm. Like Cloudflare in lesson 2, you only do this once.
Put your app on GitHub, privately
Your app on github.com with a Private label, and your changes listed with their notes. Only you can see it unless you invite someone.
It found something secret in the history
Go live from GitHub
Now putting it live can happen from GitHub: every time your changes are merged, the tests run, and if they pass the app updates. There are two ways; your agent can set up either.
Connect the repository in Cloudflare's dashboard. No passwords to copy around.
A small file in your app runs the tests, then puts it live with Cloudflare's own action.
Token: Cloudflare → Account API tokens → 'Edit Cloudflare Workers', scoped to this account. Store both values with gh secret set.
Undo a release
If something's wrong after a release, step back to the one before. Try it in the demo at the top of this lesson.
Then fix the problem calmly and put it live again.
Does undo bring back deleted data?
Merging means going live
Once GitHub puts your app live, accepting a change on GitHub is putting it live. The skill knows this: it works on a separate copy, shows you screenshots, and asks before merging, every time.
Your safety net: history on GitHub, tests before every release, a yes from you, and undo if you need it.
Did it work?
Tick these off. They're saved in this browser, so you can come back later.
- My app is on GitHub as a private repository
- I can see my changes listed there
- Putting it live happens from GitHub (or I chose to keep doing it myself)
- I know how to undo a release