Git is not recognized as an internal or external command


When we try to run git command on CMD or command prompt, we receive the error message “Git is not recognized as an internal or external command, operable program, or batch file”, a common error in Windows. The error occurs when the Git command-line tool is not installed or not configured correctly. This error occurs when you try to use Git commands in Command Prompt or PowerShell, but Windows cannot find the Git executable in the PATH of the windows 11/10 system.

Ezoic

Through this tutorial, you will learn how to set or add git environment variables path in Windows 11/10 to fix git is not recognized as an internal or external command, operable program or batch file.

Here are some common reasons for this error:

  1. Git Not Installed in System
  2. Git Path Misconfiguration
  3. It’s Typos Mistake

Git is not recognized as an internal or external command

Steps to add/set git environment variables path in windows 11/10 to fix git is not recognized as an internal or external command, operable program, or batch file:

Ezoic

  • Step 1 – Go to Start and type “environment variables”Ezoic
  • Step 2 – Edit Environment Setting
  • Step 3 – Edit System Environment Variable Path
  • Step 4 – Add Git to the PATH environment variable
  • Step 5 – Restart Windows CMD
  • Step 6 – Test Git Version

Step 1 – Go to Start and type “environment variables”

First of all, Open the Start menu and search for “Environment Variables” and select “Edit the system environment variables.” like following:

Step 2 – Environment Setting

Then, In the System Properties window, click the “Environment Variables” button; as shown below picture:

Ezoic

Step 3 – Edit System Environment Variable Path

Inside the Environment Variables menu, go to the System variables submenu, select Path, then click the Edit button.; as shown below picture:

Ezoic

Ezoic

Step 4 – Add Git to the PATH environment variable

If Git is not in your PATH, you can add it by clicking “New” and adding the path to the Git executable directory (e.g., “C:\Program Files\Git\cmd”).

Click “OK” to close the “Edit environment variable” dialog, “OK” again to close the “Environment Variables” dialog, and one last “OK” to close the “System Properties” dialog.

Step 5 – Restart Windows CMD

Restart any open command prompt windows, or open a new one. Now, you should be able to run git commands from any directory within the command prompt.

Step 6 – Test Git Version

After following these steps, you should be able to use Git commands without encountering the error message. You can verify that Git is correctly installed and configured by running git --version in the command prompt or PowerShell, which should display the installed Git version.

git --verion

If the output displays the git version, then git has been successfully added to the PATH variable.

Conclusion

That’s it, you should be able to fix the “git is not recognized as an internal or external command” error on Windows 10/11 and use git from the command line.

Recommended Tutorials

Ezoic

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?