beginnerRemote Repositories
Origin & Upstream
The Definition
Origin is the default name for the primary remote repository. Upstream is the remote you originally forked from.
Mental Model
"Origin is your copy on GitHub. Upstream is the original repository you forked. You pull from upstream and push to origin."
Visual Simulation
Live Engine
Watch Out (Common Pitfalls)
!
Not understanding the difference between origin and upstream
!
Pulling from the wrong remote
!
Not configuring upstream for forks
Hands-on Command
shell
~ $
git remote add origin URL
git remote add upstream URL