Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change default pull strategy in EGit

Tags:

git

eclipse

egit

How can I change the git pull strategy (rebase / merge / none) in eclipse?

It seems I can only set it when I check out a new branch but can't change it afterwards.

This seems really odd or is it not allowed to change the pull strategy on an existing branch?

like image 665
nerdess Avatar asked Sep 17 '12 15:09

nerdess


People also ask

What is default Git pull strategy?

In its default mode, git pull is shorthand for git fetch followed by git merge FETCH_HEAD . More precisely, git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch. With --rebase , it runs git rebase instead of git merge.

How do I change my EGit branch?

Right-click your project and select Team → Branch to create new branches or to switch between existing branches. You can also switch branches in the History view.

What does fetch from upstream mean in Eclipse?

fetch from upstream does not overwrite anything in the working tree. But pull will, but it will not completely destory work, it will create a conflict to manually merge if it can not do it automatically. I suggest if you are unsure, ensure you working tree is clean, and everything commited.


1 Answers

  1. Open the Git Repositories view
  2. Expand the repository in question
  3. Expand Branches → Local
  4. Right click on the branch and select Configure Branch
  5. Toggle the Rebase flag or change the Upstream Branch

If Configure Branch is not available, update EGit to at least 2.0, or use the nightly update site.

like image 177
robinst Avatar answered Sep 22 '22 23:09

robinst