upstream branch

The remote branch your local branch is linked to, which git push, git pull and git status use when you do not name one.

In more detail

git clone sets it for the first branch, and git push -u origin feature sets it when you publish a new branch. After that, plain git push and git pull know where to go, and git status reports how many commits you are ahead or behind. The word upstream is also used for the original repository in a fork workflow.

Example

git push -u origin feature/42-new-button

Related terms

Taught in

References