Getting Started
Learn how to install, configure, and deploy your first project with .git
Welcome to the .git documentation. This guide will walk you through setting up the CLI, configuring your environment, and deploying your application to our global edge network in under 5 minutes.
Ensure you have Node.js 18+ or Python 3.9+ installed, and an active GitHub/GitLab account for repository linking.
Installation
Install the .git CLI tool using your preferred package manager. The CLI handles authentication, project scaffolding, and deployments.
# npm
npm install -g @git/cli
# pip
pip install git-sdk
# Verify installation
git --version
# Output: .git CLI v2.4.1
Configuration
Create a .gitrc file in your project root to define build commands, deployment targets, and environment variables.
version: 2
build:
command: "npm run build"
output: ./dist
node: "18.x"
deploy:
regions: ["us-east", "eu-west", "ap-south"]
preview: true
auto_prune: true
env:
NEXT_PUBLIC_API_URL: "https://api.yourdomain.com"
NODE_ENV: "production"
Never commit sensitive credentials to your repository. Use the .git Secrets Manager or your provider's environment variables panel.
Quickstart Guide
Follow these steps to deploy your first application:
- Initialize a new project with
git init - Link your repository to your .git account
- Push to
mainto trigger an automatic production deployment - Push to any feature branch to generate an isolated preview URL
git init my-app
cd my-app
git link github:username/repo
git deploy --env production
â Build completed in 1.2s
â Deployed to https://my-app.git.dev
â Preview URL: https://feat-123.my-app.git.dev
Architecture Overview
.git operates on a decentralized edge-first architecture. When you push code, our system:
- Clones your repository in an isolated sandbox
- Executes your build pipeline with cached dependencies
- Optimizes assets using modern image/code splitting algorithms
- Distributes the output to 300+ edge nodes worldwide
- Routes traffic via anycast DNS with < 50ms latency
Environments
Manage multiple deployment environments with automatic isolation:
- Production â Deployed from
mainormaster. Gets your custom domain. - Staging â Deployed from
developor configurable branches. - Previews â Automatically generated for every pull request.
Configure environment-specific variables and domains in your dashboard or via CLI:
git env set DATABASE_URL "postgresql://prod.db.internal" --env production
git domain add app.example.com --env production