Git Installation Guide¶
Quick reference for installing Git on your local machine.
Check If Git Is Already Installed¶
Open your terminal and run:
If you see a version number (e.g., git version 2.39.0), Git is already installed. You can skip to verification.
macOS¶
Option 1: Xcode Command Line Tools (Recommended)¶
- Open Terminal
- Run:
xcode-select --install - Click Install in the popup dialog
- Wait for installation to complete
This installs Git along with other developer tools.
Option 2: Homebrew¶
If you have Homebrew installed:
Windows¶
Download and Install¶
- Go to git-scm.com
- Click Download for Windows
- Run the installer
- Use the default settings (click Next through the prompts)
- Complete the installation
Important Settings During Install¶
- Default editor: Select VS Code or Cursor if listed — avoid the default (Vim) unless you're familiar with it
- PATH environment: Select "Git from the command line and also from 3rd-party software" (recommended)
- Line endings: Select "Checkout Windows-style, commit Unix-style line endings" (recommended)
Verify Installation¶
After installing, open a new terminal window and run:
You should see a version number confirming Git is installed.
Configure Your Identity¶
Set your name and email for Git commits:
Use the email address you plan to use for your GitHub account (set up in the next step).
Troubleshooting¶
Command not found (Mac)? - Close and reopen Terminal after installation - Try running xcode-select --install again
Command not found (Windows)? - Close and reopen your terminal - Make sure you selected the PATH option during installation - Reinstall and select "Git from the command line and also from 3rd-party software"
Permission errors? - On Mac, you may need to enter your password during Xcode tools installation - On Windows, run the installer as Administrator
Ask AI for help
If you're stuck, paste this into ChatGPT, Claude, or Gemini:
I'm trying to install Git on [Mac / Windows] and getting this error: [paste the error message]. I followed the steps from the official guide. What should I try next?
Next Steps¶
- Set up your GitHub account (see GitHub Setup Guide)
- Install AI coding CLIs (see CLI Setup Guide)