git remote
Manages the set of tracked remote repositories.
Syntax
git remote [<options>] [<subcommand>]
Options
- -v / --verbose: Shows remote URLs along with names
- add <name> <url>: Adds a new remote
- remove <name>: Removes a remote
- rename <old> <new>: Renames a remote
- set-url <name> <newurl>: Changes the URL of a remote
- show <name>: Shows detailed info about a remote
Example
git remote -v git remote add origin https://github.com/user/repo.git git remote rename origin upstream git remote remove old-origin