Eclipse 中的“git pull --rebase”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17324715/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
"git pull --rebase" in Eclipse
提问by Jaime M.
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?
我们的版本控制经理建议我们使用git pull --rebase
从上游分支拉取新的更改。我想使用 EGit(用于 git 的 Eclipse 插件)来执行它。我怎样才能做到这一点?
采纳答案by gzm0
Use
用
git config branch.*branch-name*.rebase true
And pull
will automatically rebase.
并且pull
会自动变基。
You can set it up to configure new branches automatically.
您可以将其设置为自动配置新分支。
git config branch.autosetuprebase always
回答by robinst
You can also change the rebase configuration of a branch from within Eclipse:
您还可以从 Eclipse 中更改分支的 rebase 配置:
- Open the Git Repositoriesview and navigate to the local branch
- Open the context menu and select Configure Branch...
- In the resulting dialog, select the Rebasecheckbox
- 打开Git Repositories视图并导航到本地分支
- 打开上下文菜单并选择配置分支...
- 在出现的对话框中,选择Rebase复选框
EGit also honors the "branch.autosetuprebase" configuration when a new branch is created.
当创建新分支时,EGit 还遵循“branch.autosetuprebase”配置。