ERROR: 'git' is not recognized as an internal or external command.

+1 vote

Every time I run the git command on windows, I get the following error:

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

Is there any way to fix this? Thanks in advance.

Aug 2, 2018 in Git & GitHub by Tyrion anex
• 8,320 points

5 answers to this question.

0 votes

You have to set your PATH to point at your git installation.

Just follow the below steps:

  1. Navigate to "My Computer", right click
  2. Click on "Properties",
  3. Select "Advanced",
  4. Then choose "Environment Variables",
  5. highpoint the "Path" variable,
  6. click "Edit",

Then, add your path right before the "Variable value" field, separated by a semicolon from the already present entry.

answered Aug 2, 2018 by Sophie may
• 9,900 points
0 votes

Make sure you've set the correct path to your Git. You need to add the following paths to your PATH:

  • C:\Program Files\Git\bin\
  • C:\Program Files\Git\cmd\
answered May 7, 2019 by Himanshu
0 votes

If you've opened cmd prompt before installation of git, close it and reopen it. This is because the environment variables are only read when an application in this case cmd is launched. Relaunching it would allow it to read the variables again and see the updated path.

answered May 7, 2019 by Sid
0 votes

If you want to set up for a temporary purpose, just execute below command.

  1. open command prompt < run --> cmd >
  2. Run below command.
    set PATH=C:\Program Files\Git\bin;%PATH%
  3. Type git, it will work.
answered May 7, 2019 by Isheeta
+1 vote

You need to make sure git.exe is on the path, check with:

where git
answered May 7, 2019 by Yesha

Related Questions In Git & GitHub

0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 9,900 points
0 votes
1 answer
0 votes
1 answer

Why is Git commit not functioning with Git Bash?

This occurs because you might have git ...READ MORE

answered Aug 7, 2018 in Git & GitHub by Sophie may
• 9,900 points
+13 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 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
0 votes
1 answer
+2 votes
3 answers

Cloning the Git Repository on Eclipse (Transport Error)

File/Import... Select dialog * Git/Projects from Git * click next Select ...READ MORE

answered Jul 23, 2018 in Git & GitHub by Kalgi
• 50,840 points
+1 vote
4 answers

error cloning remote repo 'origin'

ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could ...READ MORE

answered Jun 3, 2019 in Git & GitHub by Sirajul
• 45,960 points