What is GitHub? Your Code's Home on the Internet
Understand GitHub, repositories, and collaboration — and why every builder using AI needs it.
Use the lesson prompt before you improvise
This lesson already contains a scoped prompt. Copy it first, replace the task and file paths with your real context, and make the agent stop after one reviewable change.
Matching prompts nearby
29
When you finish this lesson prompt, use the related prompt set to keep the same supervision pattern on the next task.
Understand GitHub, repositories, and collaboration — and why every builder using AI needs it.
"Help me set up and use GitHub safely for this project.
1. Explain the role GitHub should play in my workflow
2. Tell me whether this repo should be public or private and why
3. List the integrations I should expect with deployment, CI, and AI tools
4. Recommend the safest first workflow for branches and pull requests
5. Stop before changing repo visibility, secrets, or deployment permissionsGit is the system that tracks your code's history on your computer. But what happens when your laptop falls in a lake? Or when you want someone else to work on your project? Or when deployment services need to see your code?
Enter GitHub.
Git vs. GitHub: The Critical Difference
This confuses almost everyone at first, so let's be clear:
Git is the tool that tracks changes to your code. It runs on your computer. It's the software.
GitHub is a website that hosts Git repositories online. It's where you store your code on the internet, collaborate with others, and connect to other services.
Think of it this way: Git is the filing system in your office. GitHub is the hosted, shared place where those files live online.
You can use Git without GitHub (your code just stays on your computer). But you can't really use GitHub without Git (GitHub is built on Git). Almost everyone uses both together.
What GitHub Actually Gives You
A Home for Your Code
When you create a repository (repo) on GitHub, you're creating an online home for your project. All your files, all your commits, all your branches — mirrored on the internet. If your computer dies, your code is safe. If you switch computers, your code is accessible.
Collaboration
When more than one person works on a project, GitHub is how they coordinate. Even as a solo vibe coder, those collaboration features still help when an AI agent is making or reviewing changes.
Deployment Pipeline
This is huge for vibe coders. Services like Vercel and Netlify connect directly to your GitHub repository. Every time you push new code to GitHub, your app automatically rebuilds and deploys. Change your code, push it, and within minutes your live app is updated.
This "push to deploy" workflow is one of the most useful parts of modern web development. Push, and the live app updates.
Visibility and Portfolio
Your GitHub profile is your portfolio as a builder. People can see your projects, your activity, and your contributions. If you're building a career around vibe coding, a GitHub profile with real projects is tremendously valuable.
Key GitHub Concepts
Repositories
A repository is a project. One repo, one project. It contains all the files, the entire Git history, and project settings. You can make repos public (anyone can see the code) or private (only you and people you invite can see it).
Pull Requests (PRs)
A pull request is a proposal to merge changes from one branch into another. It's GitHub's killer feature. Here's the workflow:
- You create a branch for your new feature
- You make changes and commit them
- You open a pull request saying "Here are my changes, please review and merge them"
- Someone (or you) reviews the changes
- If everything looks good, the pull request is merged
Even if you're working solo, pull requests are valuable because they create a clear record of what changed and why. And if you're using Cursor with an AI, the AI can open pull requests for the changes it makes.
Issues
GitHub Issues are a built-in task tracker. You can create issues like "Add dark mode" or "Fix login bug on mobile" and track them. Issues can be linked to pull requests, so you can see exactly which code changes resolved which problem.
Actions
GitHub Actions are automated workflows that run when things happen in your repository. For example: "Every time someone pushes code, run the tests. If tests pass, deploy. If tests fail, send a notification."
You won't set these up on your first day, but knowing they exist helps you understand why many projects have a .github folder with workflow files.
What a GitHub Repository Looks Like
When you visit a repository on GitHub, you'll see:
- File browser — All the project's files and folders, just like on your computer
- README — A description of the project (displayed automatically on the repo's main page)
- Commit history — Every save point, with messages, authors, and timestamps
- Branches — All the parallel versions of the project
- Issues — The task tracker
- Pull requests — Proposed changes waiting to be reviewed or merged
- Actions — Automated workflows
It is essentially a project hub built around your code.
GitHub's Role in the Vibe Coding Ecosystem
GitHub is the connective tissue between tools like Cursor, Vercel, Bolt, Lovable, and Replit. It is often the source of truth that ties editing, review, and deployment together.
GitHub Alternatives
GitHub is by far the most popular, but alternatives exist:
- GitLab — Similar features, popular in enterprises
- Bitbucket — From Atlassian (makers of Jira), popular with teams using other Atlassian tools
For vibe coders, GitHub is the default. It has the broadest integrations and the widest community support.
Setting Up GitHub
If you don't have a GitHub account yet, here's how to get started:
- Go to github.com and create a free account
- Choose a username you're comfortable being public (it'll be part of your profile URL)
- That's it — you're ready
Creating repositories, pushing code, and connecting services comes later. Having the account is step one.
The GitHub Flow for Vibe Coders
Here's how most vibe coders interact with GitHub day-to-day:
- Start a project — Create a repo on GitHub (or let your AI tool create one)
- Build and commit — Make changes, create save points with Git
- Push to GitHub — Upload your commits to the online repo
- Auto-deploy — Vercel or Netlify automatically picks up the changes and deploys
- Repeat — Each improvement follows the same cycle
It becomes second nature quickly, and the safety net is worth it.
Try this now
- Create a test repository on GitHub or open one of your existing repositories.
- Click through the
Code,Issues,Pull requests, andActionstabs so you can identify what each area is for. - Check whether the repository is public or private and say out loud why that visibility level is correct.
- If you use Vercel, Netlify, or Cursor, note which part of your workflow depends on GitHub being the source of truth.
Prompt to give your agent
"Help me set up and use GitHub safely for this project.
- Explain the role GitHub should play in my workflow
- Tell me whether this repo should be public or private and why
- List the integrations I should expect with deployment, CI, and AI tools
- Recommend the safest first workflow for branches and pull requests
- Stop before changing repo visibility, secrets, or deployment permissions
Optimize for a solo builder who still wants a professional workflow."
What you must review yourself
- Whether the repository visibility matches the data and code you are storing
- Whether the correct GitHub repository is connected to your deployment platform
- Whether any secrets belong in GitHub repository settings instead of source files
- Whether the agent is creating a workflow you can actually maintain, not just something impressive on paper
Common mistakes to avoid
- Treating GitHub like a backup drive and nothing else. It is also your integration hub for deploys, reviews, automation, and collaboration.
- Using the wrong visibility setting by default. Public repos are great for portfolio work, but private repos are safer for client work, secrets, and unfinished ideas.
- Skipping pull requests because you work alone. PRs are still valuable checkpoints when an agent is making sweeping changes.
- Assuming integrations are harmless. Connecting GitHub to deploy, billing, or infrastructure systems changes the blast radius of every push.
Key takeaways
- GitHub is the remote home for your Git history, your collaborators, and your deploy hooks
- Repositories, pull requests, issues, and actions are the main concepts worth recognizing early
- When agents touch your codebase, GitHub becomes part of your safety system, not just your storage layer
What's Next
We've been talking about Git and GitHub, and some of these operations happen through something called a "terminal." In the next lesson, we'll demystify the command line — what it is, why it exists, and why it's not nearly as scary as it looks.
