Remote Management
Remote Management
List remotes
$ git remote -v
Shows all configured remotes with their fetch and push URLs.
Add a remote
$ git remote add upstream <url>
Common when working with forks — origin is your fork, upstream
is the original repository.
Rename a remote
$ git remote rename origin old-origin
Remove a remote
$ git remote remove upstream
Also removes all remote-tracking branches for that remote.
Switch a remote URL (HTTPS to SSH)
$ git remote set-url origin git@github.com:<user>/<repo>.git
Set up SSH authentication
See SSH Setup for a full walkthrough — key generation, agent configuration, GitHub registration, and troubleshooting.