GitHub Setup
Why GitHub Matters
Git tracks every change to your code. GitHub stores that history in the cloud. Together they give you:
- An undo button for your entire project. If something breaks, you can roll back to any previous version.
- A backup. Your code lives on GitHub's servers, not just your laptop.
- Collaboration. If you ever work with others (or a second AI agent), everyone can work from the same codebase.
You don't need to learn git commands. Your AI coding agent handles that. You just need an account and a connection.
One-Time Setup
1. Create a GitHub Account
Go to github.com and sign up. Free accounts include unlimited private repositories.
Already comfortable with GitHub?
Steps 2 and 3 are optional. If you prefer to create and manage repositories yourself through the GitHub website, skip the CLI install entirely. Just create your repo on github.com, clone it locally, and point your AI agent at the folder. It can still commit and push code for you — it just won't create the repo itself.
2. (Optional) Install the GitHub CLI
The GitHub CLI (gh) lets your AI agent create repos and push code on your behalf.
- Mac: run
brew install ghin your terminal. Alternatively, download the.pkginstaller from the GitHub CLI releases page — expand the "Assets" list and look for the file ending inmacOS_universal.pkg. If macOS says the file "can't be opened because it is from an unidentified developer," go to System Settings → Privacy & Security, scroll down, and click Open Anyway. - Windows: run
winget install GitHub.cliin PowerShell. Alternatively, download the.msiinstaller from the GitHub CLI releases page.
There's no pop-up confirming the install succeeded. To verify, open a terminal and run
gh --version — if it prints a version number, you're set.
3. (Optional) Log In
Run this in your terminal:
gh auth login
It will ask a few questions:
- Where do you use GitHub? → GitHub.com
- Preferred protocol? → HTTPS
- Authenticate Git? → Yes
- How to authenticate? → Login with a web browser
Then it opens your browser to complete sign-in. You only need to do this once.
That's It
From here, your AI agent can handle the rest. When you start a new project, just ask it:
"Create a private GitHub repo called my-project and push my code."
It will initialize git, create the repo, and push — no git knowledge required.