I have two main branches in Git: master
and dev
.
The structure of my branches look like this:
B-->E-->F-->G (master branch)
B-->C-->D-->H-->I-->J-->K (dev branch)
Before I performed the merge, master
and dev
had a common parent B
.
In commits E
, F
and G
of master, I deleted some files (say foo
and bar
) incorrectly while they still exist in commits C
onwards in dev
branch.
As a result, when I performed a three-way merge to join G
and K
by creating commit L
, L
does not contain foo and bar anymore! And I was not notified by Git in any way about their disappearance.
It seems to me that because E
, F
and G
were simply replayed after commit C
hence foo
and bar
were gone.
This behavior of Git merge is strange to me. Because I would not be able to know if someone deleted some files from another branch.
Shouldn't I be at least notified about any conflicting modifications while merging?