It seems to me that the phrase 'upstream branch' is ambiguous and appears to have two contexts.
an upstream branch is one that is tracked by a local branch (see Git Branching - Remote Branches), and
an upstream branch is something in the context of rebasing (see Git Branching - Rebasing).
'upstream' in (2) is displayed in the CLI help:
$ git rebase -h
usage: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] [<upstream>] [<branch>]
or: git rebase [-i] [options] [--exec <cmd>] [--onto <newbase>] --root [<branch>]
or: git-rebase --continue | --abort | --skip | --edit-todo
The first one is clear to me but, for the life of me, I can't seem to wrap my head around what 'upstream' refers to in rebase
. Furthermore, I've come across having 'multiple upstream branches', (git branch with multiple upstreams) which further confounds this conundrum.
It seems to me that this notion of 'upstream branch' needs some disambiguation in the git-scm.com documentation. This would go a long way towards making sense of such commands as:
$ git rebase --onto master server client
described in Git Branching - Rebasing, and
$ git rebase master server