Advanced Configuration

Fine-tune your deployment pipeline, customize build behaviors, and configure production-grade settings for your .git workspace.

💡

Configuration Priority

Settings in .gitrc override environment variables, which override platform defaults. Use git config --list to inspect active values.

Configuration File

The primary configuration is stored in .gitrc at your repository root. .git automatically detects and applies these settings during the build and deploy phase.

version: 2 build: env: - NODE_VERSION=20 commands: - npm ci --production - npm run build output: ./dist deploy: region: auto cache: true preservedPaths: - .cache - node_modules/.bin security: headers: X-Frame-Options: DENY Strict-Transport-Security: max-age=31536000; includeSubDomains advanced: concurrency: 4 timeout: 3600 rollback: automatic

Configuration Reference

Complete list of supported configuration keys, types, defaults, and behaviors.

Key Type Default Description
build.env Array [] Environment variables injected during build step
build.output String ./public Directory containing static assets post-build
deploy.region String auto Primary deployment region (auto, us-east-1, eu-west, ap-south)
deploy.cache Boolean true Enable incremental cache persistence across deploys
advanced.concurrency Integer 2 Max parallel build workers
advanced.timeout Integer 1800 Build timeout in seconds
advanced.rollback String manual Auto-rollback strategy: automatic, health-check, none

Environment Variables

Override configuration values using environment variables. Prefix with GIT_ and convert keys to uppercase.

⚠️

Security Note

Never commit secrets to .gitrc. Use the .git dashboard or GIT_SECRET_* env vars for sensitive values.

Variable Maps To Example
GIT_BUILD_OUTPUT build.output GIT_BUILD_OUTPUT=./build
GIT_DEPLOY_REGION deploy.region GIT_DEPLOY_REGION=eu-west
GIT_ADVANCED_TIMEOUT advanced.timeout GIT_ADVANCED_TIMEOUT=7200
GIT_CACHE_ENABLED deploy.cache GIT_CACHE_ENABLED=false

Best Practices

Verification

Run git config inspect to see your resolved configuration tree including inherited and overridden values.