GitHub Setup Guide
What Is GitHub?
Section titled “What Is GitHub?”GitHub is a website where people store and share code projects. If Git tracks your changes locally (like a save history on your computer), GitHub is where that history lives in the cloud — backed up, shareable, and accessible from anywhere.
As you build with AI, you’ll create prompts, skills, agents, and project files that become the foundation of your workflows. GitHub is where those files live in the cloud — backed up, versioned, and accessible from any machine. Think of it as your portfolio and safety net in one place. Your files are stored in repositories (project folders that Git tracks), and you work with them by cloning — making a local copy on your computer.
This guide walks you through creating a GitHub account, creating your first repository, and cloning it to your computer.
Prerequisites
Section titled “Prerequisites”- Email address for GitHub account
- Cursor or VS Code installed (see Editor Setup Guide)
- Git installed (see Git Installation Guide)
1. Create a GitHub Account
Section titled “1. Create a GitHub Account”- Go to github.com
- Click Sign up
- Follow the prompts to create your account
- Verify your email address
Already have an account and a repository? Skip to step 3.
2. Create a Repository
Section titled “2. Create a Repository”- From GitHub, click the + button (top-right corner) → New repository
- Enter a repository name (e.g.,
my-ai-projects) - Add an optional description
- Select Private (recommended for personal work)
- Check Add a README file
- Click Create repository
You’ll land on your new repository’s page with a README file. The URL in your browser (e.g., https://github.com/your-username/my-ai-projects) is what you’ll use to clone it in the next step.
3. Install GitHub CLI
Section titled “3. Install GitHub CLI”The GitHub CLI (gh) is required for cloning repos from Claude Desktop’s Code tab and for letting Cursor or Claude Code authenticate with GitHub programmatically. Install it before cloning.
brew install ghWindows
Section titled “Windows”winget install --id GitHub.cliLinux (Debian/Ubuntu)
Section titled “Linux (Debian/Ubuntu)”sudo apt install ghFor other Linux distributions, see the official install instructions.
Authenticate
Section titled “Authenticate”gh auth loginFollow the browser prompts to connect your GitHub account.
Verify
Section titled “Verify”gh --versiongh auth statusgh auth status should show you are logged in to github.com as your username.
Official docs: GitHub CLI manual
4. Clone a Repository
Section titled “4. Clone a Repository”Download (clone) a repository from GitHub using whichever tool you’re working in.
In Cursor or VS Code
Section titled “In Cursor or VS Code”- Open the Command Palette (Cmd/Ctrl + Shift + P)
- Type Git: Clone
- Paste the repository URL (e.g.,
https://github.com/username/project-name.git) - Choose a local folder location
- Open the cloned repository when prompted
In Claude Desktop (Code tab)
Section titled “In Claude Desktop (Code tab)”If you’re working in the Claude Desktop app without a separate code editor, you can clone a repo by asking Claude to do it for you. Because you installed and authenticated the GitHub CLI in the previous step, Claude can use gh on your behalf.
-
Open Claude Desktop and click the Code tab
-
Start a new session and pick (or create) a local folder you want the repo cloned into
-
In the chat box, paste a prompt like:
Clone
https://github.com/username/project-name.gitinto this folder. -
Approve the command when Claude asks for permission to run
gh repo clone(orgit clone) -
When it finishes, open Finder (macOS) or File Explorer (Windows) and navigate to the folder you chose — you should see the cloned repo there
Verify the Clone Worked
Section titled “Verify the Clone Worked”After cloning, confirm the repository is on your machine:
- Check the sidebar in your editor — you should see the project’s files and folders
- Open the integrated terminal (Ctrl + `) and run:
git statusYou should see a message like On branch main — this confirms the repository was cloned correctly and Git is tracking it.
Git Concepts
Section titled “Git Concepts”Understanding these terms helps when working with Claude Code.
Commit
Section titled “Commit”A commit saves a snapshot of your changes with a message describing what you did. Think of it as a save point you can return to.
Push uploads your local commits to GitHub. Until you push, your changes only exist on your computer.
Pull downloads the latest changes from GitHub to your local copy. Do this before starting work to stay in sync.
Staging
Section titled “Staging”Before committing, you stage files to indicate which changes to include. You can commit some changes while leaving others for later.
Using Claude Code for Git Operations
Section titled “Using Claude Code for Git Operations”Once you have Claude Code installed, you can perform Git operations by asking Claude in natural language:
- “Commit my changes with a descriptive message”
- “Push my commits to GitHub”
- “Pull the latest changes”
- “Show me what files have changed”
Claude Code handles the Git commands for you.
Troubleshooting
Section titled “Troubleshooting”Can’t clone the repository?
- Verify you have access to the repository
- Check that the URL is correct
- Make sure you’re signed into GitHub in your editor
Authentication issues?
- Your editor may prompt you to sign into GitHub
- Follow the browser authentication flow when prompted
Ask AI for help
If you’re stuck, paste this into ChatGPT, Claude, or Gemini:
I’m trying to clone a GitHub repository in [Cursor / VS Code] on [Mac / Windows] and getting this error: [paste the error message]. I have Git installed and a GitHub account. What should I try?
- Try cloning a public repository to practice the workflow