12

I am working on a tilebased RPG with a friend of mine who has to go away for weeks and we decided it was time to use version control/git. I am starting to regret that. After a few hours we managed to get it working to the point where:

  1. I create a repository on github, add him as collaborator.
  2. I commit project in eclipse to git, push
  3. He pulls, gets it imported in his workspace
  4. I make some changes, commit push, he pulls the changes.
  5. He makes some changes, commits and pushes successfully. Changes appear in repo
  6. I try to pull changes, get errors (see image), unsuccessful.
  7. I make some changes, try to commit, get errors, unsuccessful.

Essentially we are locked with a project he can update and I cannot. I am the repo owner if that matters at all.

On trying to "Fetch from upstream": "1"

On trying to "Pull": "2"

On commit&push: "3"

We are pretty much stuck now. We rather not use skype to send files, at some point we are going to be professionals and that seems too tedious.

As requested: enter image description here

arynaq
  • 6,710
  • 9
  • 44
  • 74
  • The images were resized? If you wish to see a larger image, copy img url and go there. – arynaq Mar 08 '13 at 00:41
  • expand completely the KLM project in "Git Repositories" view, then attach the screenshot pls – guido Mar 08 '13 at 01:04
  • We have got this working by deleting the project from both computers and cloning again, everything else failed (including a variety of suggestions on google/SO). – arynaq Mar 08 '13 at 12:05
  • This may be a duplicate of http://stackoverflow.com/q/8820668/247542. – Cerin Jan 07 '15 at 16:46

2 Answers2

13

The error message "This branch is not configured for pull" in EGit is typical of a branch created locally and pushed.

That wouldn't set the merge section of that branch.
See "The current branch is not configured for pull No value for key branch.master.merge found in configuration"

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

To solve that, one way is to rename your current master branch, and, in the Git Repositories view:

  • Right-click on "Branches" / "Switch to" / "New Branch"
  • pull down "Source ref" list, select "master" branch (pull strategy "merge", "Checkout new branch" checked)
  • click "finish"

The new branch should be correctly configured

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I had seen that SO question before I posted and tried what you are suggesting but it did not work. – arynaq Mar 08 '13 at 12:03
  • @user948652 what does git config returns within your repo? Do you see a section merge for master? – VonC Mar 08 '13 at 12:04
  • I tried this and it would not let me saying 'branch already exists' (locally). I switched to another branch, deleted my local branch in question, then re-checked from origin, and it worked great. – iamface Sep 18 '13 at 17:23
6

This worked for me in Eclipse IDE with EGit:

    Open Window->Show view->Other->Git->Git Repositories
    Right click on your repo in Git Repositories view -> Properties
    Click "Add Entry..." button
    key: branch.master.remote
    value: origin
    OK
    Click "Add Entry..." button
    key: branch.master.merge
    value: refs/heads/master
    OK
    Right click on your repo -> Pull

Btw. I'm pulling master from remote and my local branch when pulling is also master.

nidalpres
  • 3,778
  • 1
  • 18
  • 12