Accepted answer

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.


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 :-

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 = 

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

geometry = 887x427+66+66 171 192


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.


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.



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.


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

replace to your github repository uri.

good luck.

    symlinks = false
    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true
[branch "master"]
    remote = origin
    merge = refs/heads/master
[remote "origin"]
    url =
    fetch = +refs/heads/*:refs/remotes/origin/*

ps: use idea, forget 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.


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.


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)


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


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


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.


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.


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:

    repositoryformatversion = 0
    filemode = false
    logallrefupdates = true

    [branch "master"] 
        remote = origin 
        merge = refs/heads/master 
    [remote "origin"] 
        url =
        fetch = +refs/heads/*:refs/remotes/origin/*

note: should be replaced with your own https clone url.


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.


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:


key = branch.master.remote
value = origin


key = branch.master.merge
value = refs/heads/master


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.

Related Query

More Query from same tag