Command 'git' not found, but can be installed with: code example
Example 1: ubuntu install git
sudo apt update
sudo apt install git
Example 2: 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