21-Day Challenge
Day04

Day 4 — GitHub branch first — the one habit that saves everything

Today you build the single most important habit in AI-assisted building. One step before every session means you never lose working code again — ever.


Simple explanation

Welcome to Day 4. Today's lesson is the shortest in the challenge. But it is the one that saves people the most pain. The problem without this habit You have a working website. You ask Claude Code to add something new. It makes changes. Something breaks — badly. You try to undo it. You cannot. Everything you built is gone or broken and you do not know how to get it back. This happens to almost every non-developer who skips today's lesson. The solution: create a branch first A branch is a complete copy of your entire project. Claude Code works on the copy. Your original stays untouched. If everything goes well — you merge the copy back in. Done. If something breaks badly — you delete the copy. Your original is perfect. Nothing lost. The habit in one sentence GitHub Desktop first. Create a branch. Then open Claude Code. In that order. Every single time. Without exception.


What to do

How to create a branch in GitHub Desktop If you do not have GitHub Desktop yet — download it free at desktop.github.com. Install it like any normal program. 1. Open GitHub Desktop. 2. Click "Current Branch" at the top. 3. Click "New Branch." 4. Name it something that describes today's work. Examples: adding-contact-form, fixing-homepage-layout, testing-new-colors. 5. Click "Create Branch." 6. Now open Claude Code and start your session. Everything Claude Code changes today happens on that branch — not your main project. When things go well — merge it back In GitHub Desktop click "Current Branch." Switch back to "main." Click "Merge into main." Your new work is now saved permanently. When things go wrong — delete the branch In GitHub Desktop click "Current Branch." Switch back to "main." Delete the broken branch. Your main project is exactly as you left it. Perfect. Safe. Today's practical task: Open GitHub Desktop. Create a branch called "day-4-practice." Open Claude Code. Ask it to change the background color of your homepage. Review the result. Merge it back to main. You have just completed your first full safe build cycle.


Copy-paste prompt

I have created a GitHub branch called "day-4-practice." In this branch only — change the background color of the homepage to a warm off-white. Do not change anything else. Do not touch any other files.


Course note

The branch-first habit is the foundation of the safe build workflow taught throughout this course. Every lesson from Day 5 onwards assumes you have this habit in place.

Key takeaway

GitHub branch first — then Claude Code. Always. A branch is a complete copy of your project. If anything breaks, you delete the branch and your original is perfect.

Start here

Start the free 5-day challenge

Next step

Join the AI course waitlist

Resource

Get the free prompt pack

Was this helpful?