Managing Multiple Remotes
A single Git repository can connect to multiple remotes simultaneously. The most common use case is open source contribution: "origin" points to your personal fork and "upstream" points to the original project.
01.The Fork + Upstream Workflow
Classic open source setup: Fork the project on GitHub (creates your copy under your account). Clone your fork — this sets origin to your fork automatically. Add the original repo as "upstream". You push your work to origin (your fork) and open pull requests. You sync from upstream to stay current with the original project.
02.Keeping Your Fork in Sync
When the original project gets new commits, you need to sync. Fetch from upstream to download new commits into remote-tracking branches. Then merge or rebase upstream/main into your local main. Then push to origin to update your fork on GitHub. This is the complete sync loop.
Commands
In open source contribution, what does "upstream" typically refer to?