问题
Our version control manager recommends us to use git pull --rebase to pull new changes from upstream branch. I want to use EGit (Eclipse plugin for git) to execute that. How can I do this?
回答1:
Use
git config branch.*branch-name*.rebase true
And pull will automatically rebase.
You can set it up to configure new branches automatically.
git config branch.autosetuprebase always
回答2:
You can also change the rebase configuration of a branch from within Eclipse:
- Open the Git Repositories view and navigate to the local branch
- Open the context menu and select Configure Branch...
- In the resulting dialog, select the Rebase checkbox
EGit also honors the "branch.autosetuprebase" configuration when a new branch is created.
回答3:
New update in Eclipse Mars shows the 'Pull...' option to rebase:
来源:https://stackoverflow.com/questions/17324715/git-pull-rebase-in-eclipse