IT Docs
CLICustom commands

Vercel CLI — Fixing Repeated Commit Messages on Previews

Why CLI preview deployments share the same commit message, and how to give each one its own label.

Vercel CLI — Fixing Repeated Commit Messages on Previews

When you deploy repeatedly with the Vercel CLI, the dashboard shows the same commit message on every preview. Here's why, and how to change it.


Why it happens

The commit message shown on a deployment isn't generated by Vercel — it's Git metadata, read from your current HEAD commit. The relevant field is githubCommitMessage: the message attached to the commit the deployment was triggered by.

So when you run vercel several times without making a new commit, HEAD hasn't moved — and every deployment is labelled with the same message. The builds are different; the commit they point at is not.


Fix 1 — Make a commit (the natural way)

Because the label tracks HEAD, committing your changes before each deploy gives every deployment its own message:

git add .
git commit -m "testing the loan-agreement fix"
vercel

This is also good hygiene if you intend to promote any of these deployments later — the live deployment ends up tied to a real commit.


Fix 2 — Override the metadata with --meta

When you're iterating fast and don't want a commit per test, pass a custom message directly on the deploy command.

vercel --meta githubCommitMessage="testing the loan-agreement fix" --meta githubDeployment=1

The shorthand for --meta is -m.

Important: when using --meta you must always include one of githubDeployment=1, gitlabDeployment=1, or bitbucketDeployment=1 to tell Vercel which Git provider you're using. Without it, the metadata won't attach correctly.

Other fields you can set the same way

Meta keyWhat it sets
githubCommitMessageThe message shown on the deployment
githubCommitRefThe branch name to associate
githubCommitShaThe commit SHA
githubCommitAuthorNameThe commit author

A bonus: any meta you set can later be filtered on with vercel list --meta.


If even committing doesn't update the label

There was a recent CLI regression where deployments via vercel --prod stopped attaching Git commit metadata at all. If a fresh commit still shows the wrong (or no) message, update the CLI to the latest version:

npm i -g vercel
vercel --version

Quick reference

# Natural: one commit per deploy
git commit -m "my message" && vercel

# Fast iteration: override the label inline
vercel -m githubCommitMessage="my message" -m githubDeployment=1

# Tell deployments apart later
vercel list --meta githubCommitMessage="my message"

On this page