git remote
git remote [-v] · git remote add <name> <url>
Risk: Safe
What it does
Lists or saves remotes: short names for online copies of your project.
When to use it
To connect your project to a repo on GitHub.
Example
$ git remote add origin https://github.com/you/diary.gitCall this GitHub address origin.
$ git remote -vShow each remote and its address.
$ git remote rename origin upstreamGive a remote a new name.
$ git remote set-url origin <new-url>The repo moved? Update the address.
Learn it in: Remotes and origin · Official docs