What is the meaning of pull strategy when creating a branch with egit?

ams picture ams · Aug 14, 2012 · Viewed 8.3k times · Source

In EGit when I got to Team > Switch to > New branch I end up with the dialog box below. What is the meaning of the various pull strategies listed on this dialog box?

enter image description here

Answer

Ashutosh Jindal picture Ashutosh Jindal · Aug 14, 2012

Take a look at this from here :

enter image description here

From the above link :

The "Pull Strategy" group is only visible when a branch is selected in the combo and allows to override the default setup for the "upstream configuration" which is helpful when fetching and pushing, but particularly when pulling. Depending on the selected option the following configuration can be chosen:

Rebase: When pulling, new changes will be fetched from upstream and the remote tracking branch will be updated. Then the current local branch will be rebased onto the updated remote tracking branch

Merge: When pulling, the changes will be fetched from upstream and the remote tracking branch will be updated. Then the current local branch will be merged with the new changes. This is the default if the new branch is based on a remote tracking branch (but this default may be overridden by specific repository configuration)

None: When pulling, no specific upstream configuration will be done for the new branch; however, if a default remote exists (a remote with name "origin", pull will try to use the configuration of this remote; this is the default if the new branch is not based on a remote tracking branch

Command Line Equivalents

I think, the command line equivalent's of the above would be as follows:

Rebase

git fetch   //This updates the remote-tracking-branch such as remotes/origin/master    
git rebase remotes/origin/master

Merge

git fetch   // This updates the remote-tracking-branch such as remotes/origin/master
git merge remotes/origin/master

Having written that, my knowledge of GIT does not make me confident of the above.