how do different branches merge when code lines are replaced by others?