git remote rename origin upstream

Category: Git - Core

git remote rename origin upstream

Rename a remote

Changes the name of the remote from origin to upstream and updates every tracking branch and config that references it. Use it when restructuring remote layouts. Existing refs like origin/main move to upstream/main.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.