How to Manage Remote Repositories in Git (git remote)

git remote manages the set of remote repository URLs your local repository knows about, most commonly a single "origin".

Published September 28, 2026

git remote manages the set of remote repository URLs your local repository knows about, most commonly a single "origin".

Key points

  • git remote -v lists all configured remotes and their URLs
  • git remote add upstream <url> adds a second remote, common when working with a forked repository
  • git remote set-url origin <new-url> changes where an existing remote points, e.g. after a repository migration

Example

git remote -v
More Git articles