Connecting a Remote
Git remote add.
Your local repository doesn't know about GitHub yet. You connect them with git remote add. You give the remote a short name, and the address.

- Local doesn't know GitHub yet
- git remote add
- A short name and the address
git remote add
Git remote add, then the name origin, then the address we copied. Origin is just the standard nickname for your main remote. Git remote dash v lists the remotes. Origin appears twice, once for fetching, which means downloading, and once for pushing, which means uploading.
git remote add origin https://github.com/sam/my-site.git git remote -v origin https://github.com/sam/my-site.git (fetch) origin https://github.com/sam/my-site.git (push)
About origin
Origin isn't special. It's just a name, and most people use it, so you'll see it everywhere. A repository can have several remotes, each with its own name. And if you typed the address wrong, git remote set dash URL fixes it.
Summary
Git remote add origin, and the address, connects your repository to GitHub. Next, sending your commits up.
Key takeaways- git remote add origin <url>
- git remote -v
- origin = the main remote