git commands in VSC Terminal not working, yet they work on cmd prompt

我们两清 提交于 2020-08-20 11:10:13

问题


Error when trying git command in cmd:

The term 'git' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

I need this to work in the integrated terminal on VSC!

Edit: I've already tried editing the path variables and the settings in VSC. Nothing works.


回答1:


"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.



来源:https://stackoverflow.com/questions/58189196/git-commands-in-vsc-terminal-not-working-yet-they-work-on-cmd-prompt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!