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-previewWHY 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
- https://github.com/netlify/cli/releases/tag/v24.8.0
- https://github.com/netlify/cli/blob/v24.8.0/docs/commands/deploy.md
- https://github.com/netlify/cli/commit/c08644e38c41d568b980883c337f4735945e1cd6
Check the installed version and the source before using it. Entry JSON