Git helps you save versions of your projects and collaborate with others.
This quick guide shows you how to install and configure Git on Windows or macOS in the simplest way.
1. Install Git on Windows
Step 1: Download Git
- Visit: https://git-scm.com
- Click Download for Windows.
Step 2: Install
Open the downloaded file and follow the steps.
You can keep the default settings — they work for most people.
Step 3: Verify
Open Command Prompt or PowerShell and run:
git --version
If you see a version number, Git is ready.
2. Install Git on macOS
Option A: Use Terminal (Most Common)
Open Terminal and type:
git --version
If Git isn’t installed, macOS will ask you to install Command Line Tools.
Click Install.
Option B: Using Homebrew
If you prefer Homebrew, run:
brew install git
3. Configure Git (Windows & macOS)
Set your name and email so your commits are labeled correctly:
git config --global user.name "Your Name"
git config --global user.email "your-email@example.com"
Check your settings with:
git config --list
4. Test Git
Try cloning a test project:
git clone https://github.com/username/repository.git
If it downloads, everything is working.
5. Basic Git Commands to Start Using
| Action | Command |
|---|---|
| Create a new Git project | git init |
| Check changes | git status |
| Add files | git add . |
| Save changes | git commit -m "message" |
| Connect to online repo | git remote add origin <url> |
| Upload your code | git push -u origin main |
| Download updates | git pull |
Top comments (0)