Step 1 of 5

Install the .git CLI

The .git command-line interface gives you full programmatic control over deployments, environments, and team workflows. Install it in under 10 seconds.

Prerequisites

Ensure you have Node.js 18+ or npm 9+ installed. The CLI also supports Homebrew, pip, and direct binary downloads.

Choose your platform

bash
brew install git-cli

# Verify installation
.git --version

Homebrew is the recommended method for macOS. It automatically handles dependencies and auto-updates.

bash
npm install -g @git/cli
# or
yarn global add @git/cli

# Verify installation
.git --version

Global npm/yarn installation works cross-platform. Requires Node.js 18+.

bash
# Download latest release
curl -fsSL https://cli.git.dev/install.sh | bash

# Move binary to PATH
mv ~/.git/bin/.git /usr/local/bin/

# Verify installation
.git --version

Works on Ubuntu, Debian, Fedora, and Arch-based distros. For Alpine, use our static binary builds.

powershell
# Run as Administrator
winget install .git-cli

# Alternative (npm)
npm install -g @git/cli

# Verify installation
.git --version

Windows users should enable developer mode and ensure PowerShell 7+ is available for optimal experience.

Verify installation

Run the following command to confirm the CLI is correctly installed and communicating with our API:

bash
.git auth verify

✓ CLI v2.4.1 is installed
✓ API endpoint connected (us-east-1)
✓ Ready to authenticate
Permission issues?

If you see Permission denied or command not found, ensure your npm global bin directory or /usr/local/bin is in your $PATH environment variable.

Optional: Enable autocomplete

Boost your productivity with shell autocompletion for bash, zsh, and fish:

bash
# Generate config
.git completion --generate > ~/.git-completion.sh

# Add to your shell config
echo "source ~/.git-completion.sh" >> ~/.bashrc