18

After some pulling, merging and conflict resolving, my GIT is stuck. This is what I tried to do (with EGit) on the main project:

  • "Pull" returns "cannot pull into a repository with state: merging_resolved"
  • "Fetch from upstream" returns "No ref to fetch from GeniusWebSocket - origin - everything up to date."
  • "Merge" is greyed in the menu.
  • "Commit" returns "Commit/amend not possible...".
  • "Push to upstream" returns "rejected - non-fast-forward".
  • "Add to index" does nothing.

Near the project title, I see [Merged master up-arrow 1 down-arrow 1].

$ git status
# On branch master
# Your branch and 'origin/master' have diverged,
# and have 1 and 1 different commit each, respectively.
#
nothing to commit (working directory clean)

How can I proceed?

Erel Segal-Halevi
  • 33,955
  • 36
  • 114
  • 183

3 Answers3

30

Since you have finished your merge, and if you don't have any pending changes, you can try a git reset --hard, and see if the issue persists. (See EGit reset your current HEAD)


Ankit Marothi suggests in the comments:

I resolved it by resetting it from egit, using Team->Reset and using mixed reset as the option.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
2

I was facing the same problem . I did a project import in between of resolving conflicts that appeared after doing a pull.

I solved it by following steps: 1. Right click on repository and click on Reset 2. I selected a branch under Remote Tracking on which there was most recent changes 3. did a MIXED Reset Type

Finally, I got all the latest version with my changes in unstaged version.

Priya Tuli
  • 51
  • 2
1

If working in eclipse IDE. goto -> Git Staging view -> commit & push, if you see there is a commit message already.

If you don't see any commit message there, synchronize your repository and go back to check it again.

Ram
  • 1,461
  • 1
  • 13
  • 17