Erreur « 'git' n'est pas reconnu en tant que commande interne ou externe »

Error “‘git’ is not recognized as an internal or external command”


Source : Stack Overflow [windows]

Vous n’avez peut-être pas configuré votre PATH correctement to point at your Git installation.

Vous devez ajouter les chemins suivants à PATH :

  • C:\Program Files\Git\bin\

  • C:\Program Files\Git\cmd\

Et vérifiez que ces chemins sont corrects. You may have Git installed on a different drive, or under Program Files (x86). Correct the paths if necessary.

Modifying PATH on Windows 10:

  • In the Start Menu or taskbar search, search for “environment variable”.

  • Select “Edit the system environment variables”.

  • Click the “Environment Variables” button at the bottom.

  • Double-click the “Path” entry under “System variables”.

  • With the “New” button in the PATH editor, add C:\Program Files\Git\bin\ and C:\Program Files\Git\cmd\ to the end of the list.

  • Close and re-open your console.

Modifying PATH on Windows 7:

  • Right-click “Computer” on the Desktop or Start Menu.

  • Select “Properties”.

  • On the very far left, click the “Advanced system settings” link.

  • Click the “Environment Variables” button at the bottom.

  • Double-click the “Path” entry under “System variables”.

  • At the end of “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.

  • Close and re-open your console.

If these instructions weren’t helpful, feel free to look at some others:

(Réponse tronquée)