Introduction

.git is the next-generation developer platform that streamlines your workflow, automates deployments, and scales with your team. This guide will help you get up to speed.

Overview

Building and shipping software shouldn't be complicated. .git provides a unified platform for version control, continuous integration, deployment, and monitoring โ€” all in one place.

Whether you're a solo developer working on a side project or leading a team of hundreds, .git adapts to your needs. Start with zero configuration and scale as you grow.

๐Ÿ’ก

New to .git?

Start with our Quick Start guide to deploy your first project in under 5 minutes. No credit card required.

Key Features

  • Instant Deployments โ€” Push code and go live in seconds with zero-config deployments
  • AI-Powered CI/CD โ€” Smart pipelines that learn from your workflow and suggest optimizations
  • Global Edge Network โ€” Deploy to 300+ edge locations worldwide for blazing-fast performance
  • Enterprise Security โ€” SOC 2 compliant with SSO, RBAC, and end-to-end encryption
  • Real-time Analytics โ€” Built-in observability with dashboards, alerts, and error tracking
  • Plugin Ecosystem โ€” 200+ integrations connecting your entire development toolchain

Quick Start

Get your first project up and running in just a few simple steps:

  1. Install the .git CLI

    Install the command-line tool using your preferred package manager:

    bash
    # Using npm
    npm install -g @.git/cli
    
    # Using Homebrew (macOS)
    brew install .git/cli/git
    
    # Using pip (Python)
    pip install .git-cli
  2. Initialize your project

    Navigate to your project directory and initialize .git:

    bash
    # Navigate to your project
    cd my-project
    
    # Initialize .git
    git init
    
    # This creates a .gitconfig file with sensible defaults
    git config init.defaultBranch main
  3. Configure your deployment

    Create a configuration file for your deployment settings:

    yaml .gitconfig.yaml
    name: my-project
    version: "2.0"
    
    build:
      command: "npm run build"
      output: ./dist
      env:
        NODE_VERSION: "20"
    
    deploy:
      regions:
        - us-east-1
        - eu-west-1
        - ap-southeast-1
      auto_preview: true
      rollback: auto
    
    cache:
      paths:
        - node_modules/
        - .cache/
  4. Deploy to production

    Push your code and deploy with a single command:

    bash
    # Deploy to production
    git deploy --prod
    
    # Output:
    โœ“ Building project... (12.3s)
    โœ“ Running tests... (4.1s)
    โœ“ Deploying to production...
    โœ“ Live at https://my-project.git.dev
โœ…

That's it!

Your project is now live. Visit the URL shown in the terminal to see your deployment.

Project Structure

A typical .git project follows this structure. Not all files are required โ€” .git auto-detects your framework and configures defaults accordingly.

text directory tree
my-project/
โ”œโ”€โ”€ .gitconfig.yaml      # .git configuration
โ”œโ”€โ”€ .gitignore           # Files to exclude
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ pages/
โ”‚   โ””โ”€โ”€ utils/
โ”œโ”€โ”€ tests/
โ”‚   โ”œโ”€โ”€ unit/
โ”‚   โ””โ”€โ”€ e2e/
โ”œโ”€โ”€ .git/               # Git metadata (auto-created)
โ”‚   โ”œโ”€โ”€ config
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ””โ”€โ”€ objects/
โ””โ”€โ”€ dist/               # Build output

Configuration Reference

The .gitconfig.yaml file is the heart of your .git setup. Here are all available configuration options:

d>
Property Type Default Description
name string project name Your project's display name
version string "1.0" Config schema version
build.command string auto-detectBuild command to run
build.output string ./dist Build output directory
build.env object {} Environment variables for build
deploy.regions string[] ["us-east-1"] Deployment regions
deploy.auto_preview boolean true Auto-generate preview URLs
cache.paths string[] auto-detect Directories to cache between builds
ai.enabled boolean true Enable AI code review suggestions
monitoring.alerts boolean true Enable monitoring alerts

Authentication

Authenticate with .git using the CLI before running commands that require API access:

bash
# Interactive login (opens browser)
git auth login

# Login with token (CI/CD environments)
git auth login --token $GIT_TOKEN

# Verify authentication
git auth whoami
# Output: developer@organization.git.dev

# Logout
git auth logout
โš ๏ธ

Token Security

Never commit your GIT_TOKEN to source control. Use environment variables or a secrets manager in CI/CD pipelines.

Token Scopes

.git tokens support granular permission scopes:

Scope Permission
repo:read Read repository contents and metadata
repo:write Push code, create branches, and manage repos
deploy:read View deployment status and logs
deploy:write Trigger deployments and manage environments
admin:full Full administrative access

Environment Variables

Manage environment variables through the dashboard, CLI, or directly in your config file. Variables are encrypted at rest and injected at build time.

bash
# Set an environment variable
git env set DATABASE_URL "postgresql://user:pass@host/db"

# Set for specific environment
git env set API_KEY "sk_live_..." --env production

# List all variables
git env list

# Remove a variable
git env unset API_KEY
๐Ÿ”’

Sensitive Data

Never hardcode secrets in your source code. Always use git env or the dashboard to manage sensitive environment variables.

CLI Reference

Here are the most commonly used .git CLI commands:

bash
# Project management
git init                        # Initialize a new project
git status                      # Check project status
git build                       # Run local build

# Deployment
git deploy                      # Deploy to staging
git deploy --prod               # Deploy to production
git deploy --preview            # Create preview deployment
git deploy --rollback           # Rollback last deployment

# Logs & monitoring
git logs                        # View deployment logs
git monitor                     # Real-time monitoring dashboard
git errors                      # View error tracking

# Team & access
git members                     # List team members
git invite user@example.com     # Invite a team member
git roles                       # Manage roles and permissions

Next Steps

Now that you understand the basics, explore these topics to deepen your knowledge:

  • ๐Ÿ“– Quick Start Guide โ€” Deploy your first project step by step
  • โš™๏ธ Advanced Configuration โ€” Deep dive into .gitconfig options
  • ๐Ÿ” Security Best Practices โ€” Keep your deployments secure
  • ๐Ÿค– AI Code Review โ€” Set up automated code reviews
  • ๐ŸŒ Edge Deployments โ€” Deploy globally for optimal performance
  • ๐Ÿ“ก REST API Reference โ€” Programmatic access to .git
โœ๏ธ Edit this page on GitHub