0

I got this message when I run git status:

Your branch and 'origin/develop' have diverged,
and have 1 and 2 different commits each, respectively.

I followed the usual steps to resolve the issue:

  • git pull
  • resolve conflicts
  • git commit
  • git push

But I got the push rejected. Running git status again:

Your branch and 'origin/develop' have diverged,
and have 2 and 2 different commits each, respectively.

If I try to pull, the conflict is the same as before! I can commit again, and the story repeats over and over. It seems that Git is not able to determine that I have already done the merge. How is this possible?

Please note:

  • I already tried git remote update followed by git merge
  • I don't know how this situation was created, and I'm not able to reproduce it
  • I'm not interested in trivial solutions, I already solved in practice by saving my files and re-cloning the repository. I'm looking for an analysis of the problem.
Community
  • 1
  • 1
0x5C91
  • 3,360
  • 3
  • 31
  • 46

0 Answers0