• Register

Several users get this error when trying to run the Git command in command prompt. Some users face this issue when they install the Git for windows and others face the issue as the Git installation is complete.

Why this error occurs?

This error can occur due to the following scenarios;

  • The Git path is not set in Variables.
  • CMD was opened during the installation of GIT.


This error can be solved in many ways but here we will discuss how to solve by using the Automatic way of adding the GIT path to Variables.

  • Press Window+R to open up a Run dialog box. Then type “appwiz.cpl” and press Enter to open up the Program and features window.
  • Inside program and features look for the Git entry and uninstall it. Then follow the on-screen prompts to remove the current installation of Git.
  • Restart your computer to complete the uninstall process.
  • Download the latest version of Git for Windows.
  • Open the installation executables and follow on with the installation prompts. Leaves all the options to the default value. When you get Adjusting your PATH environment and make sure you select the Use Git from Windows Command Prompt toggle.
  • Continue the installation configuration by leaving the default selected values, then click on the Install button.
  • Once the installation is complete, restart your computer. In the next step, you will be able to run the commands directly from Windows Command Prompt.
posted Jul 9 in GitHub 160 points