GitHub: Your Code, Online
beginner16 min readLesson 48 of 143
Push your repository to GitHub so it is backed up, shareable, and open for collaboration — the remote in every developer's workflow.
Git is local; GitHub hosts Git repositories online. The online copy is called a remote. Publishing your repo gives you backup, a portfolio, and collaboration — every job application you will ever make starts with a link to your GitHub.
Connect and push
After creating an empty repo on github.com (the site shows you these exact commands):
git remote add origin https://github.com/ada/my-site.git
git push -u origin main
originis the conventional nickname for your remotepushuploads commits;-uremembers the pairing so future pushes are justgit push
The daily cycle with a remote
git pull # fetch + merge anything new from the remote
...work, add, commit...
git push # share your commits
clone is the reverse of remote-add: it downloads an existing repo with its
full history — git clone <url> is how you join any project.
README, issues, pull requests
- README.md — the repo's front page: what it is, how to run it
- Issues — a to-do list of bugs and ideas
- Pull request (PR) — "please merge my branch": the review-and-discussion step every team uses. On your own repos, open PRs to yourself for practice; reading diffs is a skill worth building early.
What you learned
- A remote is your repo hosted online;
originby convention pushuploads,pulldownloads,clonestarts fresh- README, issues, and PRs are how real projects communicate
Next: putting a real site on the internet — GitHub Pages.