git is not recognized as an internal or external command

0 votes

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?

Apr 28, 2022 in Other DevOps Questions by Kichu
• 19,040 points
5,540 views

1 answer to this question.

0 votes

Add the following paths to PATH:

  • C:\Program Files\Git\bin\
  • C:\Program Files\Git\cmd\

Then check whether the paths are correct or not.

Modifying PATH on Windows 10:

  • Search > environment variable > Edit the system environment variables.
  • Then click on the Environment Variables. 
  • Click on Path under System variables.
  • Add C:\Program Files\Git\bin\ and C:\Program Files\Git\cmd\ to the end of the list.
  • Close the console and then re-open it

I hope this helps. 

answered Apr 29, 2022 by narikkadan
• 63,600 points

Related Questions In Other DevOps Questions

0 votes
0 answers

String was not recognized as a valid DateTime " format dd/MM/yyyy"

I want to convert my string formatted ...READ MORE

May 1, 2022 in Other DevOps Questions by Kichu
• 19,040 points
1,326 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,062 views
0 votes
1 answer

Message 'src refspec master does not match any' when pushing commits in Git

Solution. Try git show-ref to see what refs you have. ...READ MORE

answered Apr 30, 2022 in Other DevOps Questions by narikkadan
• 63,600 points
1,158 views
0 votes
1 answer

Git: Receiving "fatal: Not a git repository" when attempting to remote add a Git repo

Just init a local Git repository, into ...READ MORE

answered Apr 30, 2022 in Other DevOps Questions by narikkadan
• 63,600 points
1,230 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP