Don't overwrite one with the other (and report the conflict).
Should the process continue or should it be aborted?
DO overwrite (this is probably not advisable).
Do overwrite, but under a different name (this is probably not practicable, as it is liable to create other name conflicts with other files/directories).
There should be a conflict-check before the merging process. The user should be offered the choice of renaming the offending files (by appending a GUID at their end) and re-trying the join.
What to do if an object with name X is a file in one branch and a directory in another?