首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在VSCode中安装git

在VSCode中安装git
EN

Stack Overflow用户
提问于 2021-10-27 18:15:16
回答 3查看 4.1K关注 0票数 1

只需在npm install git终端中运行VSCode,并使用以下响应运行git --version

代码语言:javascript
复制
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内部工作。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2021-10-27 18:20:44

尝试用-g安装git全局

代码语言:javascript
复制
npm install -g git

或者只需在正式文档https://git-scm.com/downloads中安装git即可。

票数 0
EN

Stack Overflow用户

发布于 2021-10-27 18:18:57

npm install git没有安装git (即用来操作git存储库的命令行工具)。

它安装npm包名为git,它似乎是一个JavaScript库,可以与git存储库交互(这使名称准确,但仍然具有误导性)。

npm不是一个通用的包管理器.

票数 1
EN

Stack Overflow用户

发布于 2021-10-27 21:16:50

  1. Windows、macOS和Linux/Unix安装:https://git-scm.com/downloads并从下载文件夹运行安装程序。
  2. 在命令行中键入"git --version“,减去引号。

以下是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的文档

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69743611

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档