Toolstools / github

GitHub

What this is

GitHub stores your code online.

It lets you save versions, collaborate, review changes, and connect your project to deployment tools like Vercel.

Why it matters

Without GitHub, your project stays trapped on one computer.

With GitHub, your work can be backed up, reviewed, shared with a tutor, and deployed.

What to do

Core idea

Flow

local folder -> git commit -> GitHub repository -> Vercel deploy

Git tracks the project on the learner's computer. GitHub stores a copy online.

Create the account

  1. Go to github.com.
  2. Create an account or sign in.
  3. Verify the email address.
  4. Keep the username professional enough to share.
  5. Turn on two-factor authentication when GitHub asks.

Create a repository

  1. Click New repository in GitHub.
  2. Use a simple lowercase name like cafe-website.
  3. Choose Public for class demo projects or Private for personal work.
  4. Do not add a README if you are pushing an existing local project.
  5. Click Create repository.

Visual checkpoint:

Reference

Repository page
  Owner/name: correct
  Visibility: public or private
  Code tab: empty or showing your files
  Green Code button: visible

Push an existing project

Run these inside the project folder:

Terminal command
git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://github.com/USERNAME/REPO-NAME.git
git push -u origin main

If Git says the remote already exists:

Terminal command
git remote -v

If the URL is wrong:

Terminal command
git remote set-url origin https://github.com/USERNAME/REPO-NAME.git

Core features to understand

FeatureMeaningBeginner action
RepositoryOnline project folderOne project = one repo.
CommitSaved checkpointCommit after a working change.
BranchSeparate version pathStay on main for Vibe 101.
RemoteGitHub connectionUsually called origin.
Pull requestReview workflowLearn later, not needed for first deploy.
READMEProject explanationAdd a simple summary after first push.
.gitignoreFiles Git should skipNever push node_modules or .env.local.

Secret safety

Never commit:

  • .env
  • .env.local
  • API keys
  • database passwords
  • private tokens

Check before pushing:

Terminal command
git status

If .env.local appears, stop and fix .gitignore.

Common mistakes

  • Uploading dependency folders.
  • Using unclear repository names.
  • Forgetting to commit before pushing.
  • Creating the GitHub repo with a README, then fighting merge conflicts.
  • Pushing secrets.
  • Deploying before the latest code is pushed.

Next step

Go to Vercel.