git - Git is not accessible as a source provider from VSCode
问题描述
Can't nail what's missing with Git integration in VSCode (latest 1.23.1) on Windows 10.
Got Git 2.17.0 installed.
Got it in the system-wide Path.
Got this in my User Settings
{
"git.enabled": true,
"git.path": "C:\\Git\\bin\\git.exe"
}
Git is well visible in the built-in VSCode terminal:
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
PS C:\Users\myself> git --version
git version 2.17.0.windows.1
Still nothing among "active source control providers", and no Git icon available there.
What's wrong?
P.S. None of this
Git missing in VS Code – No source control providers
or that
Visual Studio Code cannot detect installed git
worked either.
解决方案
如果工作区中没有存储库,则 VSCode 将显示消息
没有有效的源代码控制提供程序
如果您希望将存储库克隆到您的工作区,您可以使用 VSCode 文档页面中源代码管理的克隆存储库Git: Clone
部分中描述的命令
或者要初始化一个新的存储库,您可以使用在同一文档的初始化存储库部分中描述的类似有用的Git: Initialize repository
命令(顺便说一下,本节描述了您所看到的消息)。然而,这在内置源代码控制选项卡的右上角有一个匹配的按钮。
如果您还不知道,可以使用键盘快捷键访问命令面板:
Shift/ Cmd+P
或者
F1
推荐阅读
- javascript - 检查 JS 上的无限值
- laravel - “C:\xampp\tmp\php6A75.tmp”文件不存在或不可读
- java - 基于时间戳和即时查询的问题
- node.js - 无法使用 kafkajs 连接到种子代理
- unity3d - 如何在 Unity 中为任意 FBX 模型获取 FBX 文件的所有动画?
- javascript - 为什么我的下载属性不起作用?
- laravel - Laravel 表继承。如何建立关系
- android - 新的应用程序包会取代 abi 拆分吗?
- java - NullPointerException 引起:org.hibernate.MappingException:无法实例化类型:com.vladmihalcea.hibernate.type.array.StringArrayType
- c - 在 c 中发明一个简单的参数解析器