This guide will help you install and configure Git on Windows, macOS, and Linux. Git is essential for managing your code and collaborating with others.
What is Git and Why Do You Need It?
Git = A version control system that tracks changes in your code over time. Think of it as “save states” for your projects that you can go back to anytime.
GitHub/GitLab = Online services that store your Git repositories in the cloud, making it easy to share code and collaborate.
Why Git is Essential:
Track every change you make to your code
Go back to previous versions if something breaks
Collaborate with other developers
Backup your code in the cloud
Required for most programming jobs and open-source projects
Prerequisites (What You Need First)
Windows 10+, macOS 10.9+, or any modern Linux distribution
At least 100 MB of free space
Internet connection
Basic familiarity with Terminal/Command Prompt
Note: You can use tools from the resources folder, but I recommend downloading the latest versions from official websites.
Windows Installation
Step 1: Download Git for Windows
Go to the official Git website:
Visit: https://git-scm.com/download/win
The download should start automatically
If not, click “Click here to download manually”
What you’re downloading:
Git Bash (Unix-style terminal for Windows)
Git GUI (graphical interface)
Git integration for Windows
Alternative: If the download is slow, check if git-*.zip or git-*.tar.gz is available in your resources/git/ folder
Step 2: Install Git
Run the installer:
Find the downloaded .exe file (usually in Downloads)
Right-click and “Run as administrator” if prompted
Click “Yes” if Windows asks for permission
Installation wizard - Important choices:
Select Components: (Keep defaults, but make sure these are checked)
Git Bash Here
Git GUI Here
Associate .git* configuration files with the default text editor
Associate .sh files to be run with Bash
Choosing the default editor:
Recommended: Select “Use Visual Studio Code as Git’s default editor” if you have VS Code
Alternative: Select “Use Nano editor” for simplicity
Avoid: Vim (unless you already know how to use it)
Adjusting your PATH environment:
Select: “Git from the command line and also from 3rd-party software”
This lets you use Git from Command Prompt, PowerShell, and Git Bash
Choosing HTTPS transport backend:
Select: “Use the native Windows Secure Channel library”
Configuring the line ending conversions:
Select: “Checkout Windows-style, commit Unix-style line endings”
Configuring the terminal emulator:
Select: “Use Windows’ default console window”
Other options: Keep the defaults
Complete installation:
Click “Install”
Wait for installation to complete (1-3 minutes)
Click “Finish”
Step 3: Verify Installation
Open Command Prompt or PowerShell:
Press Win + R, type cmd, press Enter
OR Press Win + X, select “Command Prompt” or “PowerShell”
Test Git:
git --version
You should see something like:
git version 2.41.0.windows.1
Open Git Bash (Alternative terminal):
Right-click on Desktop → “Git Bash Here”
OR Search “Git Bash” in Start menu
This gives you a Unix-like terminal on Windows
macOS Installation
Method 1: Using Homebrew (Recommended)
Step 1: Install Homebrew (if not already installed)