Git - Upstream Branch

1 - About

An upstream is the remote branch of a tracking branch.

It defines the original repository that was forked.

3 - Shorthand

  • @{upstream}
  • or @{u}

Usage example:

git merge @{u}

4 - Management

4.1 - Add

git remote add upstream url_repo
 
## For instance
git remote add upstream https://github.com/user/repo

4.2 - Modify

git branch -u origin/branchName
# or
git branch --set-upstream-to origin/branchName
Branch branchName set up to track remote branch branchName from origin.
code/version/git/upstream.txt ยท Last modified: 2018/06/11 15:06 by gerardnico