Back
Deploy to Vercel via CLI
Ship a specific commit to production on Vercel without going through GitHub: login, checkout the commit, env vars, deploy and the most common errors.
01 · Install and login
Once per machine.
npm i -g vercel
vercel login # opens the browser, confirm with your account
vercel whoami # verify you're logged in 02 · Checkout the commit to ship
Create a new branch pointing exactly at the commit you want to deploy, without touching your working branch:
cd Frontend
git fetch origin
git checkout -b deploy-prod <COMMIT_HASH> # 40-character hash Why a separate branch: it leaves your development branch intact. The deploy-prod branch is just a pointer to the exact commit going to production.
03 · Link the project
Once per project. Prompts: scope (account or team) → existing or new project.
vercel link 04 · Deploy to production
vercel --prod 05 · Common issues
Deployment blocked: commit email could not be matched
The commit author's email isn't verified in the GitHub account linked to Vercel. Rewrite the author with a verified email:
git commit --amend --author="Name <verified-email@domain>" --no-edit
vercel --prod The correct email is the one shown in Vercel → the blocked deploy's avatar, or in the project dashboard.
06 · Logs and status
vercel logs <URL> # only if the deploy reached READY
vercel inspect <URL> --logs # also works if it ended in ERROR 07 · Back to the working branch
git checkout <develop-branch>