The current branch is not configured for pull No value for key branch.master.merge found in configuration

后端 未结 17 871
太阳男子
太阳男子 2020-11-30 16:44

I get this error when I try to pull from remote repository using Egit team>pull

The current branch is not configured for pull No value for key branc

相关标签:
17条回答
  • 2020-11-30 17:08
    The current branch is not configured for pull.
    No value for key branch.master.merge found in configuration
    

    An alternative for PULL (avoiding above error) is:

    1. FETCH to update your remote branch on your machine
    2. MERGE of your local branch with your remote branch
      (Team -> Merge... -> Remote Tracking -> origin/branch)
    0 讨论(0)
  • 2020-11-30 17:10

    Your local master branch is not set up to track remote master branch.

    You could do git pull origin master to tell git the explicit branch you want to pull or you add this to your .git/config:

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

    When you push to master for the first time, add the -u switch (git push -u origin master). This will set everything up automatically.

    0 讨论(0)
  • 2020-11-30 17:10

    As it turns out, @Michał Szajbe's answer IS the solution to the problem. The eclipse keys in question are built from the egit "working directory". Should you encounter this problem, then find the .git directory in that working directory and edit the .git/config file with a text editor, adding the section Michal describes. This is in my experience a fairly standard operation these days for cases when you first git init and push to an uninitialized remote, that creates the master branch. I haven't found a way in that case not to do the manual editing in order to git pull, even with command line git.

    After the edit is saved, right click on the git repo in your egit "Git Repositories" perspective, and choose properties, you will now see this section of keys has been created (or more likely just read from the config file) and a remote master to local master git pull will operate as expected going forward.

    enter image description here

    It's possible that you could enter these keys and values yourself, but copying and pasting what Michal shows is certainly a lot faster and probably safer. I didn't actually try adding the keys manually through the property editor nor am I likely to, as I know this method works, and makes sense since egit is simply calling through to the local git repo.

    I am also supporting some people in my office who are using Flex and the Flexbuilder editor which is built on top of eclipse and egit. These instructions are equally relevant to them.

    0 讨论(0)
  • 2020-11-30 17:11

    What I found that worked using eclispe (this is certainly not the right way to go about this but it works): push to remote repository, delete local workspace and repository, import from git using the import dialogue. The import wizard takes care of setting everything up for future pulls.

    0 讨论(0)
  • 2020-11-30 17:13

    Try windows->Show View->Navigator. In the Navigator windows, find bin folder in your project Then commit bin folder to github and hope it work well. Try pull or fetch it after all task above.

    0 讨论(0)
提交回复
热议问题