Plainbuilt

Lesson 2 of 5

Push your project to GitHub

Create a GitHub repository and push your code to it.

~5 min to complete

Vercel deploys from GitHub. Before you can deploy, your project needs to live in a GitHub repository — a cloud folder that tracks every change you make.

If you've already pushed this project to GitHub (you ran the "checkpoint our work" prompt in Mac Setup Lesson 7 and it created a repo), skip straight to Lesson 3.

Push your project in one prompt

Open your AI CLI in your project folder:

cd ~/Projects/my-first-app
claude

…or codex if that's what you installed.

Then paste this prompt:

Push to GitHub

I am a non-technical Mac user. Please explain every command in plain English before running it.

I have a project in this folder that I want to push to GitHub so I can deploy it. Please:

  1. Check whether this folder is already a git repository (look for a .git folder). If not, initialise one with git init.
  2. Check whether a GitHub remote called "origin" already exists (git remote -v). If it does, skip to step 4.
  3. Create a new private GitHub repository for this project using gh repo create. Use the current folder name as the repository name. Set it to private. Do not open it in a browser.
  4. Stage all files (git add .), write a meaningful first commit message based on what the project does, and commit.
  5. Push to GitHub (git push -u origin main).
  6. Print the GitHub repository URL and confirm the push succeeded.

Do not generate or configure SSH keys — the GitHub CLI handles authentication.

What to expect

The agent will:

  1. Check the folder's git status
  2. Create a private repo on your GitHub account using the gh auth from Mac Setup
  3. Make an initial commit and push

The whole thing takes under a minute. When it prints a github.com/... URL, you're done.

Your code is now on GitHub. Vercel will import from here.

You'll know it worked when the agent prints a github.com/your-username/your-repo URL and you can open it and see your files.

A note on private vs public

The prompt creates a private repository by default — only you can see it. Vercel can still deploy from private repos on the free Hobby plan. You can make it public later if you want to share the source code; it has no effect on whether the live site is accessible.

The next lesson connects this repository to Vercel and gets your app live.