Just ran npm install git
in VSCode terminal and ran git --version
with this response:
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
Had already restarted after installing Node.js and git install. Please help getting git to work inside VSCode.
CodePudding user response:
npm install git
doesn't install git (i.e. the command line tool to manipulate git repositories).
It installs the npm package called git which seems to be a JavaScript library to interact with git repositories (which makes the name accurate, but still misleading).
npm is not a general-purpose package manager.
CodePudding user response:
Try installing git global with -g
npm install -g git
Or just install git with the official documentation https://git-scm.com/downloads