Merge and deal with conflicts