When forking on bitbucket/github, you sometimes need to add the original repository as a remote repository so that you can pull more recent changes into your fork. I’ve seen, in other posts (e.g. How do I update a GitHub forked repository?), the original referred to as upstream.
Why “upstream” for the original and “origin” for the github/bitbucket-hosted fork? Are there other conventions out there we should be aware of?
I imagine this might be useful to visualize as “it is hard to swim upstream” so it’s even harder to push upstream… but, well, that’s an inadequate analogy.
Upstream is a common term in software development (especially open source projects) to refer to the original project you depend on.
This terminology is used to express the idea of the code changes “flowing” in one direction; in the case of a project fork, from the original project to your forked copy.
As an example, Linux distributions package software for their users, sometimes applying small patches to the code. When a user finds a defect in one of those packages and reports it to the distribution’s bug tracker, if the issue is too broad or it cannot be solved by the packagers, it may be marked as “upstream” to convey the idea that it should be forwarded to the original author of the software to be solved. Or, if a small correction can be applied by the distribution, it is good practice to “forward it to upstream”, so that other users of the same software product may benefit from it.