Managing Multiple Remotes
Learn how to work with more than one remote repository, rename and remove remotes, and sync forks with upstream.
Why Multiple Remotes?
A Git repository can talk to more than one remote at a time. The default remote is usually called origin, but you can add others.
originis typically your own copy (a fork)upstreamusually points to the original project
This setup is the backbone of open-source contribution workflows.
Listing Remotes
Use git remote -v to see every remote configured for your repo along with its fetch and push URLs.
git remote -v
origin https://github.com/you/project.git (fetch)
origin https://github.com/you/project.git (push)All lessons in this course
- GitHub Account & Repositories
- Pushing, Pulling, Cloning
- Collaborating with Remotes
- Managing Multiple Remotes