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

后端 未结 17 872
太阳男子
太阳男子 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 16:58

    While committing, if you encounter this problem. Try this simple approach:

    1. Team-> Push to upstream - A popup opens.
    2. Copy your URI and paste in that popup.

    You branch get configured to pull/push. Your code changes will be pushed to repositary.

    Thanks

    0 讨论(0)
  • 2020-11-30 16:59

    This worked for me:

    Right-click my checked-out local branch that can't pull (mine's called "development") Select "Configure Branch..." For "Upstream Branch:", I selected "refs/heads/development" For "Remote:" I selected "origin" Left "Rebase" unchecked Hit OK

    Now my config pref window looks like the one in gview's answer.

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

    The simplest solution I've found while using the Eclipse Git plugin is as follows:

    1. Right click the project and select Team > Push Branch
    2. Make sure the box next to "Configure upstream for push and pull" is checked
    3. Click next and complete the push.

    After this completes, the branch will now be correctly configured for pull as well.

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

    I just got the same issue but accepted answer did not work for me. Here's what I did (although I can't confirm if accepted answer had an impact as the updated config remains) :

    Expand your git repository tree from 'Git Repositories' view.

    Right click on 'Remotes' and select 'Create Remote'

    Select radio button 'Configure fetch' -> 'Ok'

    Select 'Change' opposite 'URI' text box

    Enter your git repository details and click 'Finish'

    Select 'Save'

    You should now be able to pull from the remote repository.

    Note - when I tried 'Dry-Run' which I think is just a connection test it failed but the pull still worked.

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

    To fix this problem in Eclipse, open the Windows menu and select Show View / Other / Git Repositories.

    From the Git Repositories tab:

    • expand your local repository
    • right click on Remote
    • click on Create Remote...
    • Remote name = origin
    • next to IRI press the Change button
    • CTRL+SPACE on URI
    • select the remote location
    • press Finish
    • press Save and Push

    Again, from the Git Repositories tab:

    • right click on origin
    • select Configure Fetch...
    • on Ref mapping press the Edit (Advanced)...
    • press Add All Branches Spec
    • select the Force Update checkbox
    • press Finish

    Again, from the Git Repositories tab:

    • right click on your local repository
    • select Properties
    • press New Entry...
    • enter the following two keys:

    (1)

    Key = branch.master.remote
    Value = origin
    

    (2)

    Key = branch.master.merge
    Value = refs/heads/master
    
    0 讨论(0)
  • 2020-11-30 17:07

    edit the config file in your repository .git folder like this.

    replace https://github.com/your/uri to your github repository uri.

    good luck.

    [core]
        symlinks = false
        repositoryformatversion = 0
        filemode = false
        logallrefupdates = true
    [branch "master"]
        remote = origin
        merge = refs/heads/master
    [remote "origin"]
        url = https://github.com/your/uri
        fetch = +refs/heads/*:refs/remotes/origin/*
    

    ps: use idea, forget eclipse

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