Git is not recognized as an internal or external command

Git is not recognized as an internal or external command

Error message showing if ‘git’ is not recognized as an internal or external command on your Windows command prompt. So there could be some reasons like Git is not properly installed in your system or system path environment is not set or the executable file of Git has got corrupted.

In the tutorial we will talk about how you can fix git’ is not recognized as an internal or external command operable program or batch file windows11|10 error. we will give some solution for this.

Here are some solutions, you can try out to fix this error:

  • Solution 1: Stop and Start Command Prompt
  • Solution 2: Set Git System Environment Path Variable
  • Solution 3: Uninstall and Reinstall Git

Solution 1: Stop and Start Command Prompt

If you have started Windows command prompt in your system before installing Git. So close it and then start it again.

Solution 2: Set Git System Environment Path Variable

If you have installed Git. For this, add the Git installation path to your system’s PATH environment variable:

  • Step 1 – Go to Start and type “environment variables”
  • 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:

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:

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.

Solution 3: Uninstall and Reinstall Git

If you are still getting the same error. To find the best way, you can completely uninstall Git from your system and re-download Git from the official website and then install it.

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

AuthorAdmin

My name is Devendra Dode. I am a full-stack developer, entrepreneur, and owner of Tutsmake.com. I like writing tutorials and tips that can help other developers. I share tutorials of PHP, Python, Javascript, JQuery, Laravel, Livewire, Codeigniter, Node JS, Express JS, Vue JS, Angular JS, React Js, MySQL, MongoDB, REST APIs, Windows, Xampp, Linux, Ubuntu, Amazon AWS, Composer, SEO, WordPress, SSL and Bootstrap from a starting stage. As well as demo example.

Leave a Reply

Your email address will not be published. Required fields are marked *