Lesson 2 of 5
Push your project to GitHub
Create a GitHub repository and push your code to it.
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:
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:
- Check whether this folder is already a git repository (look for a .git folder). If not, initialise one with
git init. - Check whether a GitHub remote called "origin" already exists (
git remote -v). If it does, skip to step 4. - 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. - Stage all files (
git add .), write a meaningful first commit message based on what the project does, and commit. - Push to GitHub (
git push -u origin main). - 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:
- Check the folder's git status
- Create a private repo on your GitHub account using the
ghauth from Mac Setup - Make an initial commit and push
The whole thing takes under a minute. When it prints a github.com/... URL, you're done.
Screenshot placeholder
A GitHub repository page showing the freshly pushed notes app, with the repository name, a green 'Code' button, and the initial commit message visible in the file list.
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.