CLI Reference

Complete command-line documentation for the .git platform. Automate deployments, manage configurations, and monitor your infrastructure from the terminal.

git init

#
Usage
git init [project-name] [options]

Initialize a new .git project in the current directory. Sets up the repository structure, configures default branching, and connects to the .git cloud pipeline.

Flags

FlagDescriptionType
--framework-fAuto-detect and configure build settings for a specific frameworkString
--regionSpecify the default deployment regionString
--envSet the initial environment variables from a filePath
--dry-runPreview initialization without creating filesBoolean

Examples

Basic initialization
git init my-app ✓ Project initialized successfully
With framework detection
git init my-app --framework nextjs --region us-east-1 ✓ Configured Next.js pipeline

git deploy

#
Usage
git deploy [environment] [options]

Deploy your application to the specified environment. Supports automatic preview URLs, zero-downtime rollouts, and instant rollbacks.

Flags

FlagDescriptionType
--prod-pDeploy directly to production (overrides branch rules)Boolean
--previewCreate a preview deployment for the current branchBoolean
--waitBlock until deployment is live and healthyBoolean
--timeoutMax wait time in secondsNumber
--forceSkip pre-deploy checks and force pushBoolean

Examples

Deploy to production
git deploy --prod --wait ✓ Deployed to production in 4.2s → https://prod.git.dev
Preview deployment
git deploy --preview ✓ Preview URL: https://feat-auth-123.git.dev

git config

#
Usage
git config [key] [value]

Manage project and user-level .git configurations. Handles API tokens, default regions, deployment strategies, and plugin preferences.

Flags

FlagDescriptionType
--global-gApply configuration to all projectsBoolean
--localApply configuration only to current projectBoolean
--formatOutput format: json, yaml, or tableString
--unsetRemove a configuration keyBoolean

Examples

Set default region
git config set region eu-west-1 ✓ Configuration updated
List all configs as JSON
git config list --format json { "region": "eu-west-1", "deployStrategy": "rolling" }

git logs

#
Usage
git logs [options]

View deployment history, build artifacts, and pipeline execution logs. Filters by status, date, or environment.

Flags

FlagDescriptionType
--statusFilter by status: success, failed, runningString
--envFilter by environmentString
--limit-nNumber of logs to returnNumber
--tailStream logs in real-timeBoolean
--jsonOutput structured JSON for scriptingBoolean

Examples

Last 5 successful deployments
git logs --status success --limit 5 2025-01-15 14:23:01 [prod] v2.4.1 3.2s ✓ 2025-01-14 09:11:45 [prod] v2.4.0 2.8s ✓
Stream production logs
git logs --env prod --tail [streaming...]

git secrets

#
Usage
git secrets [key] [options]

Securely manage environment variables and API keys. All values are encrypted at rest and injected at build/deploy time. Never commit secrets to version control.

Flags

FlagDescriptionType
--mask-mMask value output for securityBoolean
--file-fImport secrets from .env or JSON filePath
--scopeLimit to: all, production, staging, devString
--interactive-iOpen secure TUI for inputBoolean

Examples

Add secret interactively
git secrets add DATABASE_URL --interactive ✓ Secret encrypted and stored
Import from .env
git secrets add --file .env.production ✓ 12 secrets imported

git rollback

#
Usage
git rollback [deployment-id|version] [options]

Instantly revert to a previous deployment. Preserves database state and supports graceful traffic shifting.

Flags

FlagDescriptionType
--to-tTarget deployment ID or version tagString
--gradualShift traffic in 10% incrementsBoolean
--forceSkip health checks during rollbackBoolean

Examples

Rollback to specific version
git rollback --to v2.3.8 ✓ Traffic shifted to v2.3.8