“git” not recognized as an internal or external command

Contents

Multiple users report getting the error “git $ 0027 not recognized as an internal or external command” when they try to run a git command at command prompt. While some users reported that this issue occurred sometime after installing Git for Windows, others face this problem as soon as the Git installation is complete.

git-error-message-3713987$ 0027git $ 0027 not recognized as an internal or external command,

operable program or batch file.

What is causing $ 0027git $ 0027 not recognized as an internal or external command error?

We investigated this particular topic by examining various user reports. According to our research, There are several scenarios in which this error occurs:

  • Git PATH no (or is it wrong) configured in variables: recent software in the software itself or user error could have incorrectly set Git PATH in variable parentheses.

  • CMD opened during GIT installation: if you recently installed Git for Windows while an operating system prompt window was opening, the problem may be resolved as soon as you reopen the operating system prompt.

If you have difficulty solving this particular problem, this article will provide you with some troubleshooting guides. Here is a collection of methods that other users in a similar situation have used to solve the problem. For best results, Follow the methods in order until you find an effective solution to solve the problem in your particular situation..

Method 1: reopen command prompt

If it is a boy (the girl) terminal and keeps a CMD window open at all times (even during git installation), the problem may occur because the command prompt was not updated with the latest variable changes.

If this scenario applies to you, the solution is as simple as closing the CMD window and opening another. If the route is configured correctly, you will be able to use git commands without getting the error “git $ 0027 not recognized as an internal or external command”.

If this scenario is not applicable to your situation, go to next method.

Method 2: use the automatic way to add a GIT path to variables

If you want to avoid messing with PATH variables, can solve the error “git $ 0027 not recognized as an internal or external command” by using the Git install GUI to automatically create the path variables. Doing this will allow you to use Git both from Git Bash and from the Windows Command Prompt.

Here's a quick guide on how to uninstall Git and then configure the initial installation to automatically add path variables for you:

  1. Press the Windows key + R to open the Run dialog. Then type »appwiz.cpl» and hit Enter to open the Programs and Features window. appwiz-2-7-6801615Run dialog: appwiz.cpl

  2. In Programs and Features, look for a git entry, right-click and click Uninstall. Later, follow the onscreen instructions to remove the current Git installation. uninstall-1-1-4377160Uninstall your current version of Git

  3. Restart your computer to complete the uninstall process.

  4. Visit this link (here) and download the latest version of Git for Windows. The download should start automatically. If that is not the case, just click on the version associated with the bit architecture of your operating system. download-git-3742971Downloading the Git installation executable

  5. Open the installation executable and follow the installation instructions. You can leave all the options with the default values. When you get to Adjust your PATH environment, make sure to select the Use Git option from the Windows command prompt. use-git-7534623Select Use Git at the Windows command prompt

  6. Continue with the installation setup leaving the default values ​​selected (or select your own) and then click the Install button. install-1-5765956Instalar Git money Windows

  7. Once the installation is complete, restart your computer. In the next start, you will be able to run commands directly from the Windows command prompt.

If you are looking for a method that solves the problem without uninstalling the Git client, continue with next method.

Method 3: add PATH variable manually

If you've come this far with no results, you are most likely seeing this particular problem because the Git variable is not set (or it is configured incorrectly) in Environment Variables.

Fortunately, you can set the variable value manually by following a series of instructions. This is what you have to do:

  1. Open File Explorer and navigate to the cmd folder location within the Git installation. These are the default paths for the x86 and x64 versions:

     My computer (this pc)> Local disk(C:)> Program files (x86)> Git> cmd
    My computer (This PC)> Local Disk (C:)> Program files> Git> cmd 
  2. Next, right click git.exe and choose Properties. Then, in the General tab of the git.exe Properties, copy executable location (we will need it later). copy-2-7159923Copy the location of git.exe

  3. Next, press the windows key + R to open the Run dialog, then type »sysdm.cpl» and press Enter to open the System Properties menu. system-properties-1-4904781Run Dialog Box: sysdm.cpl

  4. Inside the System Properties menu, go to Advanced tab and click Environment Variables. environment-variables-1-9437914Go to Advanced tab and click Environment Variables

  5. Within the Environment Variables menu, go to the System Variables submenu, select Route and, next, click the Edit button. edit-1-7613446Go to System Variables, select Route and click the Edit button

  6. In the Edit Environment Variables window, click the New button and just paste the location we copied in step 2. Then press Enter to create the variable. new-1-4468215Click New and paste the location of git.exe

  7. Click OK on each open message to ensure the change is saved.

  8. Open a CMD window and type “git”. It should no longer find the error “git $ 0027 not recognized as an internal or external command”. git-solved-9325979The git terminal error is now resolved

Subscribe to our Newsletter

We will not send you SPAM mail. We hate it as much as you.