One idea
GitHub is not where Git starts. Your local repo already has the commits. GitHub is the remote copy you push to so others can see it.
For this lesson, your goal is simple: connect local to remote, push, and verify the public repo looks right.
Before you push
Finish one clean commit locally before you create the GitHub repo. Do not push a half-added project just because the commands are ready.
Run status first. If you see files you did not mean to share, stop and fix it before GitHub gets a copy.
Check your repo
Use these commands from your project folder. They tell you whether your repo is clean and what branch name you are on.
git status
git branch --show-current
git log --oneline -5Create GitHub repo
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 6 done
Connect and push
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done
git remote add origin https://github.com/YOUR-USERNAME/YOUR-REPO.git
git branch -M main
git push -u origin mainWhat upstream means
The -u in git push -u origin main links your local main branch to GitHub's main branch.
After that, you can usually run only git push for new commits, and git pull when you need to bring changes down.
Common push problems
If Git says remote origin already exists, your project is already connected to a remote. Check it before changing anything.
If GitHub asks for login, use your normal GitHub authentication flow. Do not paste passwords into random terminals or share tokens in screenshots.
git remote -v
git remote set-url origin https://github.com/YOUR-USERNAME/YOUR-REPO.gitDo this now
Do each one yourself, then tap it to tick it off. The ticks are only a checklist for you: they are not marked or scored.
0 of 5 done