Your First Repo

What We’re Doing

You have a project folder on your laptop. Now you’ll make a home for it on GitHub, and connect the two.

Here’s the whole thing at a glance:

It takes about five minutes. Let’s go step by step.

Before you start, make sure:

  • You’ve signed in with gh auth login (from the install note).
  • You know which folder is your project, like projects/my-website.

It’s fine if the folder is still empty. Claude will connect it now, and send your files up once there’s something to save.


Step 1: Make the Repo on GitHub

  1. Go to github.com and sign in.
  2. Click the + in the top-right corner, then New repository.
  3. Repository name: something short, lowercase, with hyphens instead of spaces. Like my-website.
  4. Description: optional. One line about your project.
  5. Visibility: choose Private.
  6. Leave the README, .gitignore and license options off. They’re off already, so just don’t touch them.
  7. Click Create repository.

Why Step 6 Matters

It’s tempting to tick “Add a README”. It sounds helpful! But it quietly causes the most common first-timer error.

Adding a README makes GitHub create its own first save point. Now your laptop and GitHub have two different histories, and the first push gets rejected.

GitHub’s own guide says the same thing:

“To avoid errors, do not initialize the new repository with README, license, or gitignore files.” (GitHub Docs)

An empty repo is the easiest repo to connect.


Step 2: Copy the Link

After you click Create repository, look at your browser’s address bar. It shows your repo’s link:

https://github.com/your-username/my-website

Copy it.


Step 3: Give It to Claude

Open your project folder in File Explorer, right-click an empty space, choose Open in Terminal, and start Claude:

PS> claude

Then paste the link into a message like this:

Connect this folder to my GitHub repository https://github.com/your-username/my-website and push everything to it.

That’s it. Claude takes it from there.


Step 4: Watch What It Does

Auto mode on, eyes on the screen. You’ll see Claude run a few git commands. Here’s what each one means:

CommandIn plain words
git init“Start keeping save points for this folder.” (Only if it isn’t a repo yet.)
git add“Get all these files ready for a save point.”
git commit“Make the save point.”
git remote add origin ...“Remember GitHub’s address, and call it origin.”
git push“Send the save points up to GitHub.”

Origin is just a nickname. From now on, whenever Claude pushes to origin, it means your repo on GitHub.


Step 5: Check With Your Own Eyes

Claude will probably say it’s done. Go look anyway.

Refresh your repo’s page on GitHub. You should see your files listed there.

“Done” means “go look”. It takes five seconds, and it’s a habit that will save you many times.


From Now On

Your project and your GitHub repo are connected for good. After every step that works, just say:

Save a checkpoint and push it.

Your save points go up to GitHub, and your project is backed up.


If Something Goes Wrong

You seeWhat it meansWhat to do
It asks for a username or passwordThe GitHub CLI isn’t signed inRun gh auth login again
“rejected” or “fetch first”The repo wasn’t empty (the README box got ticked)Tell Claude: “The GitHub repo already has a README. Merge it in and push.”
“Repository not found”A typo in the link, or you’re signed in to a different accountCheck the link. Run gh auth status to see which account you’re using

The Shortcut, for Later

Once you’re comfortable, you can skip the website entirely. Claude can create the repo for you, using the GitHub CLI:

Create a private GitHub repo called my-website for this folder, and push everything to it.

But doing it by hand once is how you really learn what a repo is. Now you know.


Try it

Create a private repo for your website on GitHub, give its link to Claude, and check that your files show up on GitHub.

See an example prompt
Connect this folder to my GitHub repository https://github.com/your-username/my-website and push everything to it.

Then refresh the repo page on GitHub, and see your files there. If you want to be extra sure, ask Claude:

Is everything pushed to GitHub?