Domanda

I followed the tutorial http://wiki.eclipse.org/EGit/User_Guide#GitHub_Tutorial to setup EGit with GitHub. When I want to pull I had the same problem described here: The current branch is not configured for pull No value for key branch.master.merge found in configuration

When I add the following to .git/config

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

I get another error:

The current branch is not configured for pull No value for key remote.origin.url found in configuration

How can I fix this?

È stato utile?

Soluzione

As mention in bug 352687, this is probably because the remote section of your git config file doesn't include an 'origin' remote.

See the "Adding a Remote Configuration " section of the Egit User Guide:
If you don't have a remote "origin", you can add one.

add remote

(this example defines a new remote "pushtofile", but, again, you can define one named "origin" if you didn't have one yet.)

Altri suggerimenti

Full .git/config file should be like:

[core]
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[remote "origin"]
    url = http://gitlab.funshion.com/gitlab/sandbox/try-conflict-resolution.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top