Explore Courses Blog Tutorials Interview Questions
+11 votes
in DevOps and Agile by (29.3k points)

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?

2 Answers

+9 votes
by (19.4k points)
edited by

check your path is set correctly at the time of git installation and You need to add the following paths to PATH:

C:\Program Files\Git\bin\

C:\Program Files\Git\cmd\

And check that these paths are correct or not, you may have Git installed on a different drive, or under Program Files (x86). Correct the paths if necessary.

For more information about installation of git and common git commands please go through the following link:


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

Browse Categories