Skip to content

vx redeploy deploys main instead of current branch #1

@evoleinik

Description

@evoleinik

Problem

vx redeploy always redeploys the main branch deployment, ignoring the current git branch or worktree context.

Expected: When run from a worktree checked out to feat/leroy-onboard, vx redeploy should retrigger the preview deployment for that branch.

Actual: It redeployed main (airshelf-bmyzj56bz-eugeneoteam.vercel.app), not the feat/leroy-onboard preview.

Context

We needed to retrigger the Vercel preview for feat/leroy-onboard after adding missing DATABASE_URL / DIRECT_DATABASE_URL env vars. vx redeploy didn't help — had to push an empty commit from the worktree instead.

Suggested fix

vx redeploy should:

  1. Detect the current git branch (git branch --show-current)
  2. Find the latest deployment for that branch (filter by meta.githubCommitRef)
  3. Redeploy that deployment, not the latest production one

Alternatively, support vx redeploy --branch feat/leroy-onboard to explicitly target a branch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions