Git is a powerful version control system widely used in software development. Before you can use Git on your Windows machine, you need to ensure it’s properly installed. Whether you’re setting up a new environment or troubleshooting, verifying Git installation is a quick and essential first step.
This guide walks you through how to check if Git is installed on Windows, and what to do if it’s not.
✅ Method 1: Check Using Command Prompt (CMD)
Step 1: Open Command Prompt
- Press
Windows + R
, typecmd
, and hit Enter.
Step 2: Type the following command:
git --version
✅ Expected Output:
If Git is installed, you will see something like:
git version 2.42.0.windows.1
❌ If Git is Not Installed:
You’ll see:
'git' is not recognized as an internal or external command...
✅ Method 2: Check Using Git Bash
If you have Git Bash installed, open it:
- Click Start, search for Git Bash, and open it.
- Type the same command:
git --version
If Git is installed, the version number will be displayed.
✅ Method 3: Check from Windows PowerShell
You can also use PowerShell:
- Open Start > search PowerShell
- Type:
git --version
Same expected output as above.
🔧 Git Not Installed? Here’s How to Install It
- Go to https://git-scm.com/downloads
- Click “Windows”
- Download and run the installer
- Follow the setup wizard (you can leave most options default)
After installation, re-open your terminal or Command Prompt and try git --version
again.
🧠 Pro Tip
After installing Git, it’s helpful to configure your user identity:
git config --global user.name "Your Name"
git config --global user.email "yo********@ex*****.com"
✅ Summary
Task | Command | Output If Installed |
---|---|---|
Check in CMD | git --version | git version x.x.x.windows.x |
Check in PowerShell | git --version | Git version output |
Git not installed? | Visit git-scm.com | Download & install Git |
🚀 Final Thoughts
Verifying whether Git is installed on Windows is simple and fast. Once confirmed, you can start using Git to track changes, collaborate with teams, and manage source code like a pro.