为什么VSCode不能识别git?
我正在尝试将react应用程序上载到github,但VS代码无法识别Git命令 我在电脑上有Git。Git的路径是正确的,我检查了多次。我已经通过vs代码终端安装了gh页面。我还向package.json添加了必需的更改。现在,当我在vs代码终端中运行为什么VSCode不能识别git?,git,github,visual-studio-code,Git,Github,Visual Studio Code,我正在尝试将react应用程序上载到github,但VS代码无法识别Git命令 我在电脑上有Git。Git的路径是正确的,我检查了多次。我已经通过vs代码终端安装了gh页面。我还向package.json添加了必需的更改。现在,当我在vs代码终端中运行git init时,它抛出一个错误,即“git”不是可识别的命令。为什么会这样,有人能帮忙吗 这是vs代码中的git路径-“git.path”:“C:/Program Files/git/bin/git.exe”这是正确的 Git Enabled也
git init
时,它抛出一个错误,即“git”不是可识别的命令。为什么会这样,有人能帮忙吗
这是vs代码中的git路径-“git.path”:“C:/Program Files/git/bin/git.exe”这是正确的
Git Enabled也被选中
package.json在第一个{}“主页”下编辑:http://greardrear.github.io/messenger,并在脚本下添加“predeploy”:“npm运行构建”,
“部署”:“gh页面-d构建”
当我尝试执行“git init”或“git remote add origin”时,我在vs终端中得到以下消息:
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
+ ~~~
+ CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我怎样才能解决这个问题
另外,我已经尝试了所有我能找到的解决这个问题的方法。我还尝试将路径更改为“git.path”:“C:/Program Files/git/git bash.exe”,但同样无效。从my的评论中,首先检查重启电脑是否有帮助
Powershell可能需要它才能完全识别Git fir Windows安装。或者。哦,哇,显然我当时咳嗽得厉害,没想到要重新启动。。。。谢谢@vonco没问题。在计算机工程领域工作了25年,“你有没有试着停止,重新启动它?”仍然像以前一样有效☺️