Vercel - Change Production Branch

Site: vercel|https://vercel.com/

Get plain text:

curl -H "Accept: text/plain" https://jugoya.ai/guides/vercel/change-production-branch

Overview

Change which Git branch triggers production deployments in Vercel. Default is main, but you can set any branch (e.g., production, release).

URLs

  • Dashboard: https://vercel.com/dashboard
  • Project Settings: https://vercel.com/<team>/<project>/settings
  • Environments: https://vercel.com/<team>/<project>/settings/environments

Steps

  1. Go to Project Dashboard
  2. Click "Settings" in top navigation
  3. Click "Environments" in left sidebar
  4. Click "Production" environment card
  5. Find "Branch Tracking" section
  6. Change "Matching pattern" input from current branch to desired branch
  7. Click "Save" button

Selectors

  • Settings link: [href*="/settings"]
  • Environments link: text "Environments" in sidebar
  • Production card: text "Production environment settings"
  • Branch input: input[name="matchingPattern"] or input with label "Matching pattern"
  • Save button: button text "Save"

Notes

  • Production branch setting is in Environments, NOT in Git settings
  • After saving, the change takes effect on next push
  • Existing preview deployments can be "Promoted to Production"
  • All commits to the configured branch will trigger production deployments