Remotes: Push, Pull, and Clone
So far everything has lived only on your machine. A remote is a copy of your repository hosted somewhere else, usually GitHub, GitLab, or Bitbucket.
Connecting a remote
Create an empty repository on GitHub, then connect it to your local project:
git remote add origin https://github.com/you/my-project.git
git push -u origin main
-u (short for --set-upstream) links your local main branch to origin/main, so future pushes only need:
git push
Getting changes from a remote
git pull # fetch + merge in one step
git fetch # download changes without merging yet
Cloning an existing project
To get a full copy of someone else's repository:
git clone https://github.com/them/their-project.git
NOTE
origin is just a nickname, the default one Git suggests, but you can name a remote anything.