Cannot find command 'git' - windows

If your using Anacoda, then you can try this

conda install git

Add the path of git.exe to your windows environment variable called 'path'. My git.exe is in the path of 'C:\Users\LW\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin\git.exe'. Your can find your exe file in the similar folder path.


Download and Install git in your windows from here:

https://git-scm.com/download/win

Then add its installation bin path to your windows's environment path. Then you will find the git command at the command prompt globally.

This may solve you problem.

How to change environment variables : Git: Installing Git in PATH with GitHub client for Windows

For Visual studio code restart after adding the environment variables