Quickstart Publish your first site with Claude Code

Step 3 · Just enough Git

Repos: public or private

A repo (repository) is your project's folder on GitHub, plus the full history of every saved change. Your site gets one repo. Decide who can see it before you put anything in it.

Time: 5 min

Public or private

PublicPrivate
Who can see itAnyone on the internet, including every past version of every fileOnly you and people you invite
GitHub Pages on a free accountYesNo. It needs a paid GitHub plan, and the site itself is public anyway.
Pick it forA website you're publishing, like the one in this guideNotes or work you don't want strangers to read

For this guide, choose public.

Pick a name

Use lowercase with hyphens, such as history-of-st-pete. The name becomes part of your site's address, https://your-username.github.io/your-repo/, and web addresses are case-sensitive.

Create a new repo

App path

  1. Create it on GitHub

    Cloud sessions can only work in a repo that already exists, so this click is yours.

    1. Go to https://github.com/new (opens in a new tab).
    2. Type the name.
    3. Choose Public.
    4. Turn on the option to add a README.
    5. Click Create repository.
  2. Open it in a new session

    Start a new session and pick your-username/your-repo in the repository selector below the message box. If it isn't in the list, add it to the Claude GitHub App, as shown in Claude Code in the app.

VS Code path

Open your Projects folder in VS Code. The agent creates the repo with the GitHub CLI you signed in to in Git, Node & GitHub CLI.

Say this
Create a new public GitHub repository called your-repo with a README and clone it here.

Then open it yourself: File → Open Folder…, choose Projects/your-repo, and start a new conversation there. Now the agent works in your repo and reads its CLAUDE.md or AGENTS.md when it starts.

If it goes wrong

I made it private by mistake

Visibility is a repo setting, so you change it on GitHub: open the repo's Settings, scroll to the Danger Zone section and click Change visibility.

On the VS Code path, the agent can do it with the GitHub CLI:

Say this
Make your-username/your-repo public.
I pushed a password or key to a public repo

Deleting the file isn't enough, because the history keeps it. Change the password, or cancel the key and make a new one, on the site that issued it. Do that first. Then ask the agent to remove the file.

What the agent runs for you

On the VS Code path, with the GitHub CLI:

gh repo create your-repo --public --add-readme --clone

# Make a private repo public
gh repo edit your-username/your-repo --visibility public --accept-visibility-change-consequences

Saved only in this browser.