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 bygit 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.