Git & GitHub for Developers GitHub — Push Your First Repo
6 / 11
Next
GitHub — Push Your First Repo ~12min

Push to GitHub

GitHub is where the world stores code. Here is how to push your project:

Step 1 — Create repo on GitHub

Go to github.com → New repository → Name it → Create

Step 2 — Connect your local project

cd my-project
git init
git add .
git commit -m "First commit"
git remote add origin https://github.com/YOU/repo.git
git push -u origin main

Step 3 — Every time after

git add .
git commit -m "Describe your change"
git push

GitHub Pages — Free Hosting!

Settings → Pages → Deploy from branch → Your site is live at username.github.io/repo 🚀

Preview