只需在npm install git终端中运行VSCode,并使用以下响应运行git --version:
git : 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.
At line:1 char:1
+ git --version
+ ~~~
+ CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException已在安装Node.js和git安装后重新启动。请帮助让git在VSCode内部工作。
发布于 2021-10-27 18:20:44
发布于 2021-10-27 18:18:57
npm install git没有安装git (即用来操作git存储库的命令行工具)。
它安装npm包名为git,它似乎是一个JavaScript库,可以与git存储库交互(这使名称准确,但仍然具有误导性)。
npm不是一个通用的包管理器.
发布于 2021-10-27 21:16:50
以下是Gits网站上关于安装Git的附加文档:https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
要使用命令行从npm安装git,请使用"npm i git-win“减去引号。以下是npm从npm:https://www.npmjs.com/package/git-win安装git的文档
https://stackoverflow.com/questions/69743611
复制相似问题