Failed merge in EGit

I did a fetch from my remote origin to get the latest master branch that my friend had pushed to. I wanted to merge with my own master after the fetch, but whenever I do a merge with origin/master it just says “Failed”. I’ve made hard resets before trying again with same result.

Since “Failed” is pretty vague I’m asking here what to do.

  • maven resourse pluggin error
  • Given a specific revision, how do I compare or diff a file with my working copy or head revision?
  • Git repository error message with JFileChooser
  • Can EGit (Eclipse git plugin) use an SSH key instead of a username and password?
  • Setting up Libgdx project with git
  • Convert Eclipse project type from general to Java
  • Merge failed

    I have looked on the Egit wiki, but they don’t mention failure as a possible result. This tutorial says that “A Failed result may occur when there are already conflicting changes in the working directory.”, that’s all I’ve found by googling.

    Egit 2.2.0
    Eclipse Build id: 20130225-0426

  • How to restore version control in XCode?
  • git pull and reset stopped by error “unable to create file <filename> (File exists)”
  • Git: How to ignore fast forward and revert origin to earlier commit?
  • How do I check the date and time of the latest `git pull` that was executed?
  • custom git command autocompletion
  • How to avoid merging a specific file with git-pull?
  • 2 Solutions collect form web for “Failed merge in EGit”

    So the problem was Egit failed a merge without saying why.

    After playing around in the staging view and, by a leap of faith from someone not entirely comfortable with Git, added all the unstaged files to the index (which is strange since I did a hard reset, why should there be differences?) I committed it. After I had done the commit, another file (a .jar) popped up in the unstaged list (why wasn’t it there until I made my commit? Seriously). I added it to the index and committed. Finally there were no unstaged files.

    I tried merging, and it worked. At last I got the “conflicted” result instead of “failed”. Added everything to index and committed. Finally I seemed to have merged successfully, and I could push.

    Honestly can’t tell if I made mistakes or if Egit doesn’t work properly.

    In the Git repositories view.
    1. right click the local -> master branch
    2. select push branch -> next
    3. it pop up a ‘select push destination’ window, check the ‘force update’ in it.

    Git Baby is a git and github fan, let's start git clone.