sincecutoff.com
← all changes

Netlify CLI deploy sets branch as alias

Introduced 2026-03-27 · score 0.91

HOW TO USE IT

When deploying a repository branch with Netlify CLI v24.8.0, pass the branch name with `--alias`; the CLI uses that alias as the deploy branch value. Note the docs warn against alias values that match deployed branch names.

netlify deploy --alias=<branch>
netlify deploy --alias custom-alias --context deploy-preview

WHY THIS HELPS

Deploy a repository branch by using it as the deploy alias.

REQUIREMENTS AND LIMITATIONS

  • Version: 24.8.0
  • --alias <string> (required): Alias for the deployment, used at the beginning of the deploy subdomain; the v24.8.0 change also uses the alias as the branch value for the deploy request and build.
  • --context <string>: Deploy context for environment variables read during the build; documented values include `production`, `deploy-preview`, `branch-deploy`, `dev`, or `branch:<branch>`.
  • Docs conflict: The v24.8.0 source confirms `--alias` is used as the deploy branch value, but the v24.8.0 CLI reference says avoid an alias matching a deployed branch and that `--alias` does not create a branch deploy.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card