Add --no-checkout flag to avoid checking out the default branch first, fixes #2717