Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to deploy custom github branch on vercel

Tags:

next.js

vercel

Is there a way to select a custom branch to deploy ? I do not seem to be able to select a branch and it takes the default main branch

thanks in advance

like image 706
Maxime Ghéraille Avatar asked Sep 03 '25 09:09

Maxime Ghéraille


2 Answers

Vercel automatically deploys any commit you push to a branch.

You can also customize which branch is used as the Production Branch in the project settings: Go to Project Settings > Git > Production Branch

like image 107
haverchuck Avatar answered Sep 05 '25 00:09

haverchuck


If you want to deploy a branch without pushing a commit, you can use vercel-cli. To re-deploy the preview environment:

vercel --force

To re-deploy the production environment:

vercel --prod --force

If you haven't setup vercel-cli yet check Vercel's CLI document

Source: Deploy An App Without Pushing An Empty Commit

like image 25
trkaplan Avatar answered Sep 04 '25 23:09

trkaplan