Fallback to origin remote if head of parent repository is detached