What Is Git?
Git is a version control tool that tracks changes to your files. It's the standard tool used by developers worldwide.
Git is already installed in WebTerm Learn courses. This guide is for setting up Git on your own computer.
Installing on macOS
There are two ways to install Git on macOS.
Option 1: Xcode Command Line Tools (Recommended)
The simplest method. Open Terminal and run:
xcode-select --install
Click "Install" when the dialog appears. This installs Git along with other developer tools.
Option 2: Using Homebrew
If you have the Homebrew package manager installed:
brew install git
If you don't have Homebrew yet, follow the instructions at brew.sh.
Installing on Windows
Option 1: Git for Windows (Recommended)
Download the installer
Visit git-scm.com and download the Windows installer.
Run the installer
Run the downloaded file. You'll see several configuration screens — the defaults are fine for most users. Just click "Next" through each step.
Open Git Bash
After installation, open Git Bash from the Start menu. This is a terminal where you can use Git.
Option 2: Using WSL (Windows Subsystem for Linux)
If you have WSL set up, you can install Git inside your Linux environment:
sudo apt update && sudo apt install git -y
For WSL setup instructions, see "Getting Started with WSL: Run Linux on Windows."
Installing on Linux
Use your distribution's package manager.
Ubuntu / Debian
sudo apt update && sudo apt install git -y
Fedora / RHEL
sudo dnf install git -y
Arch Linux
sudo pacman -S git
Verifying the Installation
On any OS, run the following to confirm Git is installed:
git --version
If you see a version number, you're good to go:
git version 2.45.0
Initial Configuration
Before using Git, set your name and email. These are recorded in every commit (change record) you make.
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
Verify your settings with:
git config --list
The --global flag sets the configuration for your entire machine. To use different settings for a specific project, run the command without --global.
Next Steps
Git is installed and configured. In WebTerm Learn's "Git Introduction" course, you can practice Git commands right in your browser. Everything you learn there works the same way in the environment you just set up.