Stage 8 — Push to GitHub
Upload every commit in your local
mainbranch to GitHub in one command.
What You'll Learn
git push -u origin main- What the
-uflag does (sets upstream tracking) - How to verify a push worked by reloading the GitHub page
Prerequisites
You finished Stage 7. git remote -v shows origin pointing at your GitHub repo, and the GitHub page still shows an empty repository.
What Changes
No local files change. What changes is GitHub — your four commits appear online.
Outcome
- The GitHub repo page now shows
index.htmlandstyle.csswith the dark theme. - The "commits" link in the GitHub UI shows all four save points.
- Running
git pushby itself (no arguments) in the future will push toorigin/main, because-uset up tracking.