没有活动的源代码控制提供程序 [英] There are no active source control providers

查看:56
本文介绍了没有活动的源代码控制提供程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的VS Code编辑器的Ubuntu安装表明它没有活动的源代码控制提供程序:

My Ubuntu installation of the VS Code editor states it has no active source control providers:

我正在使用Ubuntu,并且正在运行

I'm using Ubuntu, and running

$ git --version

表明它是v2.18.0

indicates it is v2.18.0

我的项目中有一个.git文件夹.

There is a .git folder in my project.

如何解决此问题?

推荐答案

另外两个答案探讨了如何在VS Code中设置git可执行文件的路径此处最初是在这里以及其他.显然,在Windows中,这是必需的.(与linux的 git.path null 相对,但可能从 PATH 调用git)

Two other answers explore setting the path to the git executable in VS Code here and originally here and others. Apparently in Windows this is necessary. (As opposed to linux where the git.path is null, but perhaps git is called from PATH)

要重申,请验证您在VS Code(文件->首选项->设置或F1(打开命令调色板)->设置)中的设置是否包含以下内容:

To reiterate, please verify that your settings in VS Code (File -> Preferences -> Settings or F1 (Open command palatte) -> Settings) contains the following somewhere:

{
    // Is git enabled
    "git.enabled": true,

    // Path to the git executable
    "git.path": "C:\\path\\to\\git.exe"
}

请注意,您必须在右侧窗口中更改设置,这些设置将覆盖左侧窗口中的默认设置.

Note that you'd have to change settings in the right hand window, which override the default ones in the left hand one.

这篇关于没有活动的源代码控制提供程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆