• Register
0 votes
861 views

Problem :

I have installed Git for Windows but when I try to use git command in Command Prompt I get the following message:
'git' is not recognized as an internal or external command, operable program or batch file.
6.9k points

Please log in or register to answer this question.

2 Answers

0 votes

Solution :

I also had same problem with my GIT.
I simply followed following steps to get the issue resolved:
  1. Please go to your My Computer =>(C:) => Program Files(x86) => Git => cmd
  2. Now do the right Click at git => Select Properties
  3. On the location Copy the following text C:\Program Files (x86)\Git\cmd
  4. Now come back to your Desktop
  5. Right click on your My Computer
  6. Select the property
  7. Open the Advanced
  8. Click on Environment Variables
  9. Now in the System variables search the Variable called Path
  10. Click on the variable
  11. Click on the Edit Button
  12. Select the required Variable value Text Box .
  13. Go to the edge of the text box and enter the semicolon(;)
  14. Then Just do the Right click and click on Paste
  15. Finally press on Ok
38.6k points
0 votes

Solution:

You require to include the following paths to PATH:

  • C:\Program Files\Git\bin\

  • C:\Program Files\Git\cmd\

And inspect that these paths are right – you may have Git installed on a different drive, or under Program Files (x86). Fixed the paths in case required.

Modifying PATH on Windows 10:

  1. In the Start Menu or taskbar search, seek for "environment variable".
  2. Choose "Edit the system environment variables".
  3. Click On the "Environment Variables" button at the bottom.
  4. Double-click the "Path" entry under "System variables".
  5. With the "New" button in the PATH editor, include C:\Program Files\Git\bin\ and C:\Program Files\Git\cmd\ to the end of the list.
  6. Close and re-open your console.

Modifying PATH on Windows 7:

  1. Right-click "Computer" on the Desktop or Start Menu.

  2. Choose "Properties".

  3. On the very far left, click the "Advanced system settings" link.

  4. Click the "Environment Variables" button at the bottom.

  5. Double-click the "Path" entry under "System variables".

  6. At the end of "Variable value", insert a ; in case there is not meanwhile one, and then C:\Program Files\Git\bin\;C:\Program Files\Git\cmd\. Do not put a space between ; and the entry.

  7. Close and re-open your console.

or Follow this steps

  1. Go to My Computer => Local Disk(C:) => Program Files(x86) => Git => cmd
  2. Right Click On the git => Select Properties
  3. Beneath the location Copy the text eg - C:\Program Files (x86)\Git\cmd
  4. Come back to the Desktop
  5. Right-click My Computer
  6. Choose property
  7. Open Advanced
  8. Click Environment Variables
  9. In the System variables Find the Variable call Path
  10. Click on the variable
  11. Click the Edit Button
  12. Choose the Variable value Text Box .
  13. Go to the edge of the text and put semicolon(;)
  14. Then Right-click and press Paste
  15. Press Ok

In case you are employing GitHub for Windows (GitHub's old Git GUI that is no longer available for download, not the new Electron-based GitHub Desktop), you have an installation of Git under:

C:\Users\<YOUR USERNAME>\AppData\Local\GitHub\PortableGit_8810fd5c2c79c73adcc73fd0825f3b32fdb816e7\cmd

Extend this path, and include it to PATH.

31.7k points
edited by

Related questions

0 votes
1 answer 32 views
32 views
Problem: I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, operable program or batch file. How do I fix this problem?
asked Apr 25 muktaa 34.6k points
0 votes
1 answer 37 views
37 views
Problem: I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, operable program or batch file. How do I fix this problem?
asked Apr 25 sumaiya simi 43.9k points
0 votes
1 answer 32 views
32 views
Problem: I have an installation of Git for Windows, but when I try to use the git command in Command Prompt, I get the following error: 'git' is not recognized as an internal or external command, operable program or batch file. How do I fix this problem?
asked Apr 24 ochena 23.3k points
0 votes
1 answer 41 views
41 views
Problem: Is there some way to solve this problem: Chcp' is not recognized as an internal or external command, operable program or batch file?
asked Jun 11 akhi 125k points
0 votes
1 answer 27 views
27 views
Problem: What exactly is the solution : &lsquo;$' is not recognized as an internal or external command, operable program or batch file.
asked Jun 12 Nahil 128k points
0 votes
1 answer 29 views
29 views
Problem: Need an answer for this : 'python' is not recognized as an internal or external command, operable program or batch file
asked Jun 12 Chi Omega 168k points
0 votes
1 answer 50 views
50 views
Problem: Is there somebody who can assist : 'psql' is not recognized as an internal or external command, operable program or batch file?
asked Jun 11 Nahil 128k points
0 votes
1 answer 22 views
22 views
Problem: Is there some way to solve this problem: Curl' is not recognized as an internal or external command, operable program or batch file?
asked Jun 11 akhi 125k points
0 votes
1 answer 15 views
15 views
Problem: How do I solve this issue: 'pip' is not recognized as an internal or external command, operable program or batch file?
asked Jun 11 akhi 125k points
0 votes
1 answer 17 views
17 views
Problem: Has anyone experienced this before: Pip3' is not recognized as an internal or external command, operable program or batch file?
asked Jun 11 akhi 125k points