git deploy
Deploy your application to production or staging environments directly from your terminal.
STABLE
v2.4.1 · Build #1380
Synopsis
SYNTAX
git deploy [--env ENVIRONMENT] [--region REGION] [--wait]
Description
The git deploy command triggers an automated build and deployment pipeline based on your current branch configuration. It validates your manifest, runs the build step, and pushes the artifact to the specified environment.
By default, it deploys to the environment mapped to your current branch (e.g., main → production, feature/* → preview).
Options
| Flag | Description | Default |
|---|---|---|
--env, -e |
Target environment (dev, staging, prod) |
staging |
--region, -r |
Deployment region or edge location | auto |
--wait |
Block terminal until deployment status is confirmed | false |
--dry-run |
Validate configuration without executing pipeline | false |
--tail |
Stream deployment logs to stdout | false |
Examples
Deploy to production and wait for confirmation
TERMINAL
git deploy --env prod --wait --tail
✓ Validating .gitconfig...
✓ Build queued (id: 7f3a9c2b)
✓ Deploying to prod-eu-west-1
✓ Health checks passed (4/4)
✓ Live: https://app.git.dev/prod
Run a dry-run to check pipeline config
TERMINAL
git deploy --dry-run
[DRY RUN] Pipeline validation successful.
[DRY RUN] Estimated build time: ~14s
[DRY RUN] Target region: auto-selected (us-east-1)
Environment Variables
| Variable | Description |
|---|---|
GIT_DEPLOY_TIMEOUT |
Maximum wait time in seconds before aborting (default: 300) |
GIT_DEPLOY_VERBOSE |
Enable debug logging when set to true |
GIT_CLI_TOKEN |
Authentication token for CI/CD runners |
Exit Codes
| Code | Meaning |
|---|---|
0 |
Deployment successful |
1 |
Validation error or missing configuration |
2 |
Authentication or permission denied |
3 |
Deployment failed (check logs with git deploy --tail) |
130 |
Interrupted by SIGINT (Ctrl+C) |
Related Commands
git preview— Generate ephemeral preview URLs for pull requestsgit rollback— Revert to a previous deployment snapshotgit env set— Manage environment variables and secrets
Last updated: 2025-01-15 · Build #1380 · Report documentation issue