Git & CollaborationIntermediate
Upstream
PronunciationUP-stream
Definition
Upstream refers to the original repository that you forked from, or the default remote branch that your local branch tracks for pulling and pushing changes.
Where you hear it
When pulling the latest changes from the main project or configuring git remotes.
Examples
Run
git remote add upstreamto link your fork to the original repository.Always fetch from the upstream repository before starting a new feature.
I pulled the latest changes from upstream before rebasing my fork.
Common mistake
Confusing upstream with origin, where origin is your own remote repository and upstream is the original main project.
Don't confuse with
Upstream refers to the original source repository, while origin refers to your own personal fork or remote copy of the repository.
Say it at work
- In a meeting or chat
Did you remember to pull the latest changes from upstream before pushing your code?
- In an email or ticket
Please ensure your branch is up to date with the upstream repository before opening a pull request.
Keep exploring
More in Git & Collaboration