git is not recognized as an internal or external command operable program or batch file

0 votes

I have downloaded the Git for Windows, but everytime 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? Any help will be appreciated.

Feb 8, 2022 in Others by Rahul
• 9,670 points
3,003 views

1 answer to this question.

0 votes

If the PATH of yours is set correctly to the point of the download of Git, then this error should not occur. You will have to add these two lines for following paths to PATH:

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

Once this has commenced and been completed, do check and search that these paths are correct for which you may have to install the Git into a separate drive. It can also be done under Program Files (x86) so please do rectify the paths if necessary.

To ensure the modification of the PATH on Windows 10, one must click on the Start Menu and search for "environment variable". After which selecting the "Edit the system environment variables" is crucial. After which one must click the "Environment Variables" on the base and then double tap on the PATH Entry which comes beneath the System variables.
Add

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

to the end of the list by using the New button in the Path Editor. After this step, close and re-open the console. 

To ensure the modification of the PATH on Windows 7, one must start by right clicking “Computer” on the Start Menu and then select “Properties”. On the extreme left, please click on the “Advanced System Settings” link given and then click on the “Environmental Variables button at the base. Under the system variables, double tap on the “Path” entry. At last,  on the "Variable value", insert a ; if there is not already one, and then

C:\Program Files\Git\bin\;C:\Program Files\Git\cmd\. 

Do not put a space between ; and the entry following which, please close and re-open your console.

answered Feb 8, 2022 by Soham
• 9,700 points

Related Questions In Others

0 votes
1 answer

'adb' is not recognized as an internal or external command, operable program or batch file

Set the path of adb into System ...READ MORE

answered Feb 16, 2022 in Others by Aditya
• 7,680 points
6,337 views
0 votes
1 answer

ERROR:'keytool' is not recognized as an internal or external command, operable program or batch file

Check if the directory and the keytool ...READ MORE

answered Feb 18, 2022 in Others by Rahul
• 9,670 points
8,007 views
0 votes
1 answer

'npm' is not recognized as internal or external command, operable program or batch file

To your existing lines of code, include ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,670 points
10,945 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
3,523 views
0 votes
1 answer

'git' is not recognized as an internal or external command

Add the following paths to PATH: C:\Program Files\Git\bin\ C:\Program ...READ MORE

answered Apr 29, 2022 in Other DevOps Questions by narikkadan
• 63,420 points
4,852 views
0 votes
1 answer

'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine

In order to fix this problem, you ...READ MORE

answered Feb 10, 2022 in Others by Soham
• 9,700 points
1,478 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