Not every team ships from main. If your release process runs through a release, stable, or similarly named branch, you can point Vercel's production branch at it instead of restructuring your repository. It's a single-project setting, and this guide covers what it does and how to change it.
Start with how Vercel decides which branch is production by default.
Copy link to headingHow Vercel chooses your production branch
By default, Vercel deploys your production branch to your live site, and it picks that branch for you when you create a project. It looks for main first. If there's no main, it falls back to master, and then to your repository's default branch.
This is a per-project setting, so each project can map production to the branch that best fits its workflow. When your team ships from a release or stable branch, you change this setting rather than renaming branches in Git. The control lives in your project settings.
Copy link to headingHow to set a non-default branch for production
You change the production branch from your project's settings, in the Environments area. The change takes a few clicks and applies right away.
To set a non-default production branch:
- Open your project on the dashboard and select Settings.
- Go to Environments, then select the Production environment.
- Open its Branch Tracking section.
- Enter the branch you want to use for production.
- Select Save.
After you save, every push to that branch creates a production deployment. Nothing else in your project needs to change.
Copy link to headingWhat happens to your non-production branches
Changing the production branch doesn't stop Vercel from building your other branches. Every branch that isn't your production branch deploys as a preview deployment instead.
Each preview gets its own URL, so you can test and review changes in isolation before they reach production. Pushing to the production branch is the only action that updates your live site, which keeps a clear line between work in progress and what your visitors see.
Copy link to headingNext steps
With production wired to the branch your team ships from, every push to it goes straight to your live site. To apply the same setup to a new project, start a new project or browse the templates for a preconfigured starting point.
Copy link to headingRelated resources
Copy link to headingFrequently asked questions
Copy link to headingWhen does changing the production branch take effect?
The change applies as soon as you save it. From that point, every new push to the branch you selected creates a production deployment. Your existing live deployment stays in place until the next push or merge to that branch triggers a new one.
Copy link to headingHow do I deploy my current code to the new production branch?
Push to or merge into the new production branch as you normally would, and Vercel builds it as a production deployment. If that code already exists as a preview, you can also promote a preview deployment to production from the dashboard or CLI.
Copy link to headingCan each Vercel project use a different production branch?
Yes. The production branch is a per-project setting, so you can point each project at whichever branch suits its workflow. One project can deploy from main while another deploys from release or stable. Changing the branch on one project has no effect on any other project.