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

EclipseGitEgit

Eclipse Problem Overview


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 > branch.master.merge found in configuration

Eclipse Solutions


Solution 1 - Eclipse

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.

Solution 2 - Eclipse

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.

Solution 3 - Eclipse

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

Solution 4 - Eclipse

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.

Solution 5 - Eclipse

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.

Solution 6 - Eclipse

Same problem. Here's how I solved it within eclipse/egit:

Originally I cloned a remote repo to my office computer (my own repo, but on a remote server). Then I created a new branch of repo project locally ("testing"), and pushed it to remote repository. Cloned remote repo to my laptop, switched to "testing" branch, worked on it, etc., pushed, then came back to office. When I tried to pull "testing" changes from server, got msg "local branch not configured for pull".

Problem is that on desktop, "testing" is local only, does not have remote URL info, so cannot pull changes.

I solved this within eclipse (egit) by:

  1. deleting local branch
  2. pull branch from remote repo as new branch.

Steps were:

  • Go to Git Repository Exploring perspective
  • rename local branch "zzz" (paranoid, don't like deleting until sure I've got it right!)
  • rt-click "Branches", "Switch to", "New Branch"
  • pull down "Source ref" list, select "testing" branch (pull strategy "merge", "Checkout new branch" checked)
  • click "finish"
  • Switch to usual perspective, make sure my files are present
  • switch back to Git Repository Exploring and delete branch "zzz"

Note: am running Eclipse Indigo . Steps may be different on other releases.

Solution 7 - Eclipse

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.

Solution 8 - Eclipse

About gview's solution:

then find the .git directory in that working directory and edit the .git/config file with a text editor

You don't need to find it yourself or open it with a text editor.

  • Window -> Show view -> Other -> GIT -> Git Repositories
  • Expand the repo folder you created.
  • It will contain a folder called "Working Directory" expand it.
  • There will be a folder inside the "Working Directory" folder called ".git" expand it.
  • Inside ".git" there will be "config", right click "config" -> open in editor. The config file will open right in Eclipse where you can edit it. I added the following and now I can pull without errors:

[branch "master"]

remote = origin

merge = refs/heads/master

Solution 9 - Eclipse

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.

Solution 10 - Eclipse

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.

Solution 11 - Eclipse

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)

Solution 12 - Eclipse

git repository view -> + branches -> local -> select the local branch you want to assign to the remote one -> right click -> select the remote (probably origin) and the upstream branch

Solution 13 - Eclipse

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.

Solution 14 - Eclipse

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

Solution 15 - Eclipse

You need to replace your config file with this code.. your config file is located inside 'git' folder in your repository. The 'git' folder is hidden so first you have to show the hidden files. Open the config file and write these codes :-

[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true


hideDotFiles = dotGitOnly
[remote "origin"]
url = 'url to the git repository that you want to pull'
fetch = 

+refs/heads/*:refs/remotes/origin/*
puttykeyfile = 
[branch "master"]
remote = origin
merge = refs/heads/master
[gui]
wmstate = normal


geometry = 887x427+66+66 171 192

Solution 16 - Eclipse

I got the same issue in Eclipse Neon. But none of the solution worked for me. I got the issue when I changed branch of the project and then it threw this error.The solution I tried is:

  1. Go to project/.git/config file.
  2. If rebase = false, remove it.
  3. Refresh your project.
  4. Do git pull or pull from eclipse.
  5. Error resolved.

PS: As it is an old thread, just updating as this might come in for someone else.

Solution 17 - Eclipse

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIsmail MarmoushView Question on Stackoverflow
Solution 1 - EclipseMichał SzajbeView Answer on Stackoverflow
Solution 2 - EclipsegviewView Answer on Stackoverflow
Solution 3 - EclipseMarco LackovicView Answer on Stackoverflow
Solution 4 - EclipseZip184View Answer on Stackoverflow
Solution 5 - EclipsechelderView Answer on Stackoverflow
Solution 6 - Eclipseian scott-flemingView Answer on Stackoverflow
Solution 7 - Eclipseblue-skyView Answer on Stackoverflow
Solution 8 - EclipsemikeView Answer on Stackoverflow
Solution 9 - EclipsethomasView Answer on Stackoverflow
Solution 10 - Eclipseuser11435View Answer on Stackoverflow
Solution 11 - EclipseRobertoView Answer on Stackoverflow
Solution 12 - EclipsepiotrekView Answer on Stackoverflow
Solution 13 - EclipseFrancis BrennanView Answer on Stackoverflow
Solution 14 - EclipseTGichView Answer on Stackoverflow
Solution 15 - EclipseviperView Answer on Stackoverflow
Solution 16 - EclipseAsthaUndefinedView Answer on Stackoverflow
Solution 17 - EclipseGanapati prasadView Answer on Stackoverflow