stablyai/orca · warning · Error

No base branch to rebase onto

Error message

No base branch to rebase onto

What it means

Thrown by `runActionSheetRebase` when `resolveMobileBranchCompareBaseRef` returns null — meaning none of `worktree.show`, `repo.list`, or `repo.baseRefDefault` yielded a base ref (or all degraded to git-unavailable). Without a base ref there is nothing to rebase onto, so the workflow aborts with this message rather than sending an empty `baseRef` to `git.rebaseFromBase`.

Source

Thrown at mobile/src/source-control/use-mobile-source-control-action-sheet-runners.ts:76

      await runGitSequence(actionId, steps)
      setShowActionSheet(false)
    },
    [runGitSequence, setShowActionSheet]
  )

  const runActionSheetGitSync = useCallback(async () => {
    await runGitSync('sync')
    setShowActionSheet(false)
  }, [runGitSync, setShowActionSheet])

  const runActionSheetRebase = useCallback(async () => {
    await runGitWorkflow('rebase', async () => {
      if (!client) {
        throw new Error('Waiting for desktop...')
      }
      const baseRef = await resolveMobileBranchCompareBaseRef(client, worktreeId)
      if (!baseRef) {
        throw new Error('No base branch to rebase onto')
      }
      await sendGitRequest<unknown>('git.rebaseFromBase', { baseRef })
    })
    setShowActionSheet(false)
  }, [client, runGitWorkflow, sendGitRequest, setShowActionSheet, worktreeId])

  return {
    runActionSheetCommit,
    runActionSheetCommitSequence,
    runActionSheetCommitSync,
    runActionSheetGitSequence,
    runActionSheetGitSync,
    runActionSheetRebase
  }
}

View on GitHub (pinned to 1136503c6a)

Solutions

  1. Configure a default/base branch on the host repo (set `origin/HEAD` or the repo's base-ref setting).
  2. Update the desktop host so `repo.baseRefDefault` resolves a sensible default.
  3. Use a different workflow (explicit merge/sync) until a base ref is configured.
Defensive patterns

Strategy: validation

Validate before calling

// Resolve the base ref first; only enable Rebase if one exists.
const baseRef = await resolveMobileBranchCompareBaseRef(client, worktreeId)
const canRebase = baseRef !== null

Try / catch

try {
  await runActionSheetRebase()
} catch (err) {
  if (err instanceof Error && err.message === 'No base branch to rebase onto') {
    setActionError('Configure a base branch on the host to enable rebase.')
  } else throw err
}

Prevention

When it happens

Trigger: Tapping Rebase on a repo/worktree where no base branch is configured anywhere: worktree has no `baseRef`, the repo summary has no `worktreeBaseRef`, and `repo.baseRefDefault` is unavailable or empty.

Common situations: Fresh repo with no default branch set; the repo's `origin/HEAD` is unset so the host cannot infer a base; the host build is too old to expose `repo.baseRefDefault` and the other fields are also blank.

Related errors


AI-assisted analysis of stablyai/orca@1136503c6a (2026-08-12). Data as JSON: /api/errors/6031df009c3f5ab7. Report an issue: GitHub.