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 deployGit tracks the project on the learner's computer. GitHub stores a copy online.
Create the account
- Go to github.com.
- Create an account or sign in.
- Verify the email address.
- Keep the username professional enough to share.
- Turn on two-factor authentication when GitHub asks.
Create a repository
- Click New repository in GitHub.
- Use a simple lowercase name like
cafe-website. - Choose Public for class demo projects or Private for personal work.
- Do not add a README if you are pushing an existing local project.
- 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: visiblePush 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 mainIf Git says the remote already exists:
Terminal command
git remote -vIf the URL is wrong:
Terminal command
git remote set-url origin https://github.com/USERNAME/REPO-NAME.gitCore features to understand
| Feature | Meaning | Beginner action |
|---|---|---|
| Repository | Online project folder | One project = one repo. |
| Commit | Saved checkpoint | Commit after a working change. |
| Branch | Separate version path | Stay on main for Vibe 101. |
| Remote | GitHub connection | Usually called origin. |
| Pull request | Review workflow | Learn later, not needed for first deploy. |
| README | Project explanation | Add a simple summary after first push. |
.gitignore | Files Git should skip | Never 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 statusIf .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.