GitHub Safety

Never start an AI session without doing this one thing first

Most beginners open Claude Code or Codex and just start building. One habit takes 10 seconds and means you never lose working code again.


Simple explanation

Imagine your project is a Word document. A branch is like making a full copy of that document before you start editing. You edit the copy. The original sits untouched on your desktop. If the edits go wrong — you still have the original. Perfect. Unchanged. Safe. GitHub calls that copy a branch.


What to do

Open GitHub Desktop before every AI session. You will see a button at the top that says "Current Branch." Click it. Click "New Branch." Name it something simple like "todays-changes" or "adding-contact-form." Click Create. Now start your AI session. Everything AI touches happens on that branch. Your main project is completely safe. When you're done and everything works: Go back to GitHub Desktop. Click "Current Branch." Switch back to "main." Click "Merge into main." Your working changes are now saved permanently. When something breaks: Simply delete the branch. Switch back to main. Your original code is exactly as you left it. Start again. Nothing lost. The order that matters: Open GitHub Desktop first. Create a branch. Then open Claude Code. In that order. Every time. Without exception.


Copy-paste prompt

I am about to start a new AI session to [describe what you want to build or change]. Before I do, can you confirm the correct GitHub Desktop steps to create a new branch so my main project stays safe while we work?


Course note

Creating a branch before every session is one of the first habits the course builds into your workflow — it is the safety net that lets you experiment without fear.

Key takeaway

Open GitHub Desktop first. Create a branch. Then open Claude Code. In that order. Every time. Without exception.

Start here

Start the free 5-day challenge

Next step

Join the AI course waitlist

Resource

Get the free prompt pack

Was this helpful?