I am using EGit 2.1.0 in eclipse juno.
On a repository I right-click the origin/master branch in the Remote Tracking folder and create a new branch:
Source ref: refs/remotes/origin/master
Branch name: refs/heads/MyFeature
Merge=true
Checkout=true
So the MyFeature branch is based on the content of origin/master at the time its created. As a result a local branch MyFeature is created in the Local folder.
If I configure the branch is says:
Upstream Branch: refs/heads/master
Remote: origin
I am confused about this last part. The MyFeature branch is based on origin/master. Why does it default to pull changes from the local master branch and not the remote master branch (which it was based on)?
From command-line you would do:
$ git branch --track MyFeature origin/master
Branch MyFeature set up to track remote branch refs/remotes/origin/master.
‘Upstream branch’ means the branch in the upstream repository. “
refs/heads/masterinorigin” is another (longer but more precise) way of saying “origin/master“.