Eclipse EGIT: Current branch not configred for pull

流过昼夜 提交于 2019-12-04 02:28:25
VonC

The error message "This branch is not configured for pull" in EGit is typical of a branch created locally and pushed.

That wouldn't set the merge section of that branch.
See "The current branch is not configured for pull No value for key branch.master.merge found in configuration"

[branch "master"]
  remote = origin
  merge = refs/heads/master

To solve that, one way is to rename your current master branch, and, in the Git Repositories view:

  • Right-click on "Branches" / "Switch to" / "New Branch"
  • pull down "Source ref" list, select "master" branch (pull strategy "merge", "Checkout new branch" checked)
  • click "finish"

The new branch should be correctly configured

This worked for me in Eclipse IDE with EGit:

    Open Window->Show view->Other->Git->Git Repositories
    Right click on your repo in Git Repositories view -> Properties
    Click "Add Entry..." button
    key: branch.master.remote
    value: origin
    OK
    Click "Add Entry..." button
    key: branch.master.merge
    value: refs/heads/master
    OK
    Right click on your repo -> Pull

Btw. I'm pulling master from remote and my local branch when pulling is also master.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!