Installing Git on Windows

We will use Git Bash, which provides a Unix-like terminal environment on Windows.

Step-by-Step Guide:

  1. Download the installer from git-scm.com.
  2. Run the `.exe` file.
  3. Crucial Step: When asked about "Adjusting your PATH environment", select:
    "Git from the command line and also from 3rd-party software"
  4. Keep other defaults and click Next until installed.
  5. Open "Git Bash" to verify.

Installing on macOS & Linux

🍎 macOS

# Using Homebrew (Recommended)
brew install git

# Verify
git --version

🐧 Linux (Ubuntu/Debian)

sudo apt update
sudo apt install git

# Verify
git --version

First-Time Configuration

Git needs to know who you are. This information is embedded in every commit you make.

Terminal

# 1. Set your name

git config --global user.name "Your Name"

# 2. Set your email (must match GitHub)

git config --global user.email "you@example.com"

# 3. Verify configuration

git config --list

Important Note

Use the same email address that you used to sign up for GitHub. This ensures your contributions show up on your profile correctly.

Pro Tip: Set your Editor

Git opens a text editor when you commit. The default is often Vim (which is hard to exit!). Set it to VS Code instead:

git config --global core.editor "code --wait"

Verification Checklist

Git is installed (git --version returns a version number)
Username is configured
Email is configured
You can open a terminal (Git Bash on Windows, Terminal on Mac/Linux)