Search code examples
gitgit-merge

git merge replaces one branch without actually merging them


I am trying to merge branch-to-safely-merge-pav-origin with pj-master

enter image description here

the directory structure of the branch pj-master:

enter image description here

the directory structure of the branch branch-to-safely-merge-pav-origin:

enter image description here

After the merge the content of the pj-master is being replaced (not merged) by the contents of the branch-to-safely-merge-pav-origin. No attempt to merge, no conflicts (andfor sure there are conflicts). Any clues?


Solution

  • My guess is that the files were present in pj-master~ and they were deleted in one of the revisions that takes you to branch-to-safely-merge-pav-origin. So.... the trick is to understand what was at the last revision present on both branches (pj-master~). Looking at the tips of the 2 branches is just not enough.