RROR: Cannot find command 'git' - do you have 'git' installed and in your PATH? code example

Example: ERROR: Cannot find command 'git' - do you have 'git' installed and in your 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