"Not recognized" is normally the way terminals politely tell you they don't know what you typed means.
If you can use git from a command line, then it's installed properly. You can use where git
or which git
depending on your command line to find the path of the functioning git. (if those don't work, please specify your terminal type in the question).
Once done, open VS Code, hit ctrl + ,
to open settings and type git path
in the search. Add this path, and you should be able to use git in VS Code.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…