← Level 4 – Data pro

Lesson 3 of 6 ⏱ 40 minutes Premium

GitHub: code on the internet

Upload your repository to GitHub. A cloud backup and the foundation for deployment.

Why GitHub

Git backs up history on your own computer. GitHub is a website where you upload that history: a cloud backup, sharing with friends, and a connection to Render/Vercel for deployment. Set up an account at github.com with a parent (parent’s email, age 13+ or a family account).

Show me: a new repository

  1. On GitHub: New repository → name it e.g. my-web-project → without a README (you already have local code).
  2. GitHub will show you some commands. In your project’s terminal (replace YOUR-USERNAME):
git remote add origin https://github.com/YOUR-USERNAME/my-web-project.git
git branch -M main
git push -u origin main

On the first push, GitHub will ask you to sign in: use a Personal Access Token (in GitHub settings → Developer settings → Tokens), not your account password.

  1. Refresh the repository page: your code is on the internet.

Show me: more changes

Make an edit in your code, then:

git add .
git commit -m "Fixed the footer"
git push

Three steps you’ll repeat forever: add → commit → push.

💡

Security: never commit passwords, API keys, or mail-config.php to Git. That’s why you have .gitignore and .env. If you accidentally commit a password, tell a parent right away: it needs to be changed and the history cleaned up.

Your turn 💪

  1. Create a repository on GitHub for your main project (React or server, one is enough to start).
  2. Connect it with git remote add origin ... and git push.
  3. Make a small change, commit it, and push again.
  4. On GitHub, in the Commits tab, can you see both versions?
✅

Check: Your code is on GitHub and you know the add/commit/push cycle. You can deploy the server from Level 3 to Render right from this repository: you already know how from the Master finale.

What to take away from this lesson