Is there a way to prevent git to merge files automatically as soon as both versions of a file differ from the common ancestor?
changes foo.cpp
|
----y--- (branch-a)
/
--x----------z--- (branch-b)
|
also changes foo.cpp
Let x be the common ancestor for the file foo.cpp.
In commit y e.g. a function bar() is removed from foo.cpp. Commit z adds a function bazz() at the end of foo.cpp.
When I merge branch-a into branch-b I want to be absolutely sure that function bar() is not present anymore after the merge. With the recursive merge strategy it sometimes happens, that bar() is present after the merge.
Are there any best practices in such situations?