How to Fix Git Command Not Recognized in Windows 11

When you try to run a Git command like git --version or git clone in Command Prompt or PowerShell, you might see an error message that says ‘git’ is not recognized as an internal or external command,
operable program or batch file.

If this happens, don’t panic — it simply means that Windows can’t find Git in your system’s PATH.

In this guide, we’ll explain why this error occurs and walk you through easy fixes to get Git running properly on your Windows 11 PC.

Why You See the “Git Not Recognized” Error

This error appears when Git’s installation directory is not added to the Windows PATH environment variable. Essentially, the system doesn’t know where to find the Git executable file.

Here are the most common reasons:

  • Git is not installed on your computer.
  • Git is installed, but not added to the system PATH.
  • Git installation is corrupted or incomplete.
  • You’re using an incorrect terminal (like CMD without admin rights).

Now, let’s fix it step-by-step.

Step 1: Verify Git Installation

Before modifying anything, check if Git is installed on your PC.

  1. Press Windows + S, type Control Panel, and open it.
  2. Go to Programs → Programs and Features.
  3. Look for Git in the list.
  • If Git is not listed, you’ll need to install it (see Step 2).
  • If Git is installed, proceed to Step 3 to fix the PATH issue.

Pro Tip: You can also check your installation by typing this in Command Prompt:

git --version

If it still shows the “not recognized” error, move on to the next fix.

Step 2: Reinstall or Install Git Properly

If Git isn’t installed or wasn’t added to PATH during installation, reinstalling it correctly often solves the issue.

  1. Go to the official Git download page: https://git-scm.com/downloads
  2. Download the Windows setup file.
  3. Run the installer and follow these steps carefully:
    • On the “Adjusting your PATH environment” screen, select “Git from the command line and also from 3rd-party software.”
    • Click Next for all other options (default settings are fine).
  4. Once the installation completes, restart your computer.

Now, open Command Prompt or PowerShell and type:

git --version

If it displays the version number, you’re good to go!

Tip: Installing Git with PATH access enabled ensures you can run commands from any terminal window.

Step 3: Add Git to Windows PATH Manually

If Git is installed but not recognized, you may need to manually add its directory to your system PATH.

  1. Press Windows + S, search for Environment Variables, and click Edit the system environment variables.
  2. In the System Properties window, click Environment Variables….
  3. Under System variables, find and select Path, then click Edit.
  4. Click New, then paste the Git path (default location): C:\Program Files\Git\bin and also: C:\Program Files\Git\cmd
  5. Click OK on all windows to save changes.
  6. Restart Command Prompt and type: git --version

If it shows something like:

git version 2.xx.x.windows.x

then Git is working correctly!

Pro Tip: If you installed Git in a different directory, make sure to replace the path accordingly.

Step 4: Check PATH Configuration Using PowerShell

If Git still isn’t recognized, verify whether the PATH variable is properly set.

  1. Open PowerShell.
  2. Run: echo $env:Path
  3. Look for the Git installation path in the output.

If it’s missing, go back to Step 3 and add it manually.

Step 5: Open Git Bash Instead (Quick Workaround)

If you need to use Git immediately, use Git Bash — it’s installed automatically with Git and works without PATH setup.

  1. Press Windows + S → type Git Bash → press Enter.
  2. In the terminal, type: git --version It should work right away.

Why this helps: Git Bash includes built-in Git access, even if Windows PATH isn’t configured.

Step 6: Run CMD as Administrator

Sometimes permission restrictions can prevent PATH updates from taking effect.

  1. Press Windows + S → type cmd → right-click Command PromptRun as administrator.
  2. Type: git --version
  3. If Git works here but not in a normal terminal, you might have user vs. system PATH conflicts.

Fix: Repeat Step 3 and ensure Git is added under System Variables, not just User Variables.

Step 7: Restart Windows Explorer (Without Rebooting)

If PATH changes don’t take effect immediately, restart Windows Explorer instead of rebooting.

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Find and select Windows Explorer.
  3. Click Restart at the bottom-right.

Then, open a new terminal and try again.

Wrapping Up

If you’re seeing the “Git is not recognized as an internal or external command” error on Windows 11, it simply means your system can’t locate Git’s executable files.

The easiest fix is to reinstall Git and ensure it’s added to the PATH during setup. Alternatively, you can manually add the Git directory to your environment variables.

Once configured, restart your terminal — and you’ll be able to run commands like git clone, git pull, or git push without any issues.

With Git working properly, you can now integrate it with tools like VS Code, GitHub Desktop, or Android Studio and take your development workflow to the next level

Posted by Arpita

With a background in Computer Science, she is passionate about sharing practical programming tips and tech know-how. From writing clean code to solving everyday tech problems, she breaks down complex topics into approachable guides that help others learn and grow.