Hello Vercel team,
I'm trying to verify a specific Git deployment behavior before making changes to an existing private GitHub repository.
I have two Vercel projects connected to the same monorepo. Both use apps/web as their Root Directory and track main as their Production branch.
I plan to add apps/web/vercel.json with these rules:
{ "git": { "deploymentEnabled": { "main": false, "work/abtivo-local-dev": false } }}The goal is to prevent automatic Vercel deployments when:
- The first commit introducing
vercel.jsonis pushed tomain. - A separate development branch containing the same configuration is published to GitHub.
I want to preserve the existing deployment behavior of other branches.
My main question: Does Vercel evaluate git.deploymentEnabled from the incoming commit before creating a deployment, even when the configuration file is being introduced for the first time?
Specifically, can you confirm whether this works for both Production and Preview deployments, including two Vercel projects connected to the same repository?
I need to prevent deployment creation entirely, rather than having Vercel create a deployment and subsequently skip or cancel its build through the Ignored Build Step.
If first-push prevention is not guaranteed, is there a supported alternative that allows deployment creation to be disabled for specific branches before pushing, without disconnecting Git or disturbing existing deployments?
I'd appreciate confirmation of the evaluation order or a link to the relevant technical documentation.
Thank you!