Go to the official Git website:
Download the Windows installer:
Click "Download for Windows".
Run the installer:
Double-click the downloaded .exe
file.
Install Git:
Click Next through the setup screens.
You can leave most settings as default.
Recommended options to keep:
Use Git from the Command Prompt or Git Bash.
Use the default editor (or choose VS Code if installed).
Adjust line ending settings as default (recommended).
Finish and launch:
After installation, open Git Bash from the Start Menu or search for it.
Option 1: Install via Xcode Command Line Tools (easiest)
Open Terminal.
Type:
bash git --version
If Git is not installed, you'll be prompted to install the Xcode Command Line Tools. Click Install.
Option 2: Install using Homebrew
Open Terminal.
Run:
bash brew install git
After installation, check with:
bash git --version