Skip to main content
⚡ OpenDevDocs
Git
gitgitGuideBeginner

Installing Git on macOS, Linux, and Windows

Step-by-step installation instructions for Git across macOS (Homebrew/Xcode), Ubuntu/Debian, Fedora, and Windows (Git for Windows).

Verified: 2026-09-30
Platforms:
macoslinuxwindows
#git#installation#cli#setup

Installing Git on macOS, Linux, and Windows


1. macOS Installation

brew install git

Option B: Apple Xcode Command Line Tools

xcode-select --install

2. Linux Installation

Ubuntu / Debian:

sudo apt update
sudo apt install -y git

Fedora / RHEL:

sudo dnf install -y git

Arch Linux:

sudo pacman -S git

3. Windows Installation

Download and run the official installer from git-scm.com/download/win to install Git for Windows, which includes:

  • Git Bash (Unix terminal emulation)
  • Git GUI
  • Windows Credential Manager integration

4. Verifying Installation

Verify that the CLI executable is available in your $PATH:

git --version
# Expected: git version 2.45+ or newer

On this page