The current branch is not configured for pull No value for key branch.master.merge found in configuration
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.
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.
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.
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
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.
I also had problems to configure it. It is working now so I'm going to share my configuration file. I think it will help:
[core]
repositoryformatversion = 0
filemode = false
logallrefupdates = true
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "origin"]
url = https://github.com/chelder86/ArcadeTongame.git
fetch = +refs/heads/*:refs/remotes/origin/*
Note: https://github.com/chelder86/ArcadeTongame.git
should be replaced with your own HTTPS clone URL.