FahamLah

Commands

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.git

Call this GitHub address origin.

$ git remote -v

Show each remote and its address.

$ git remote rename origin upstream

Give a remote a new name.

$ git remote set-url origin <new-url>

The repo moved? Update the address.