-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git is not found #87102
Comments
Is the workspace you have opened under Git control ? The view is only populated if you open a folder which has a .git folder. |
Do you have the prettier extension installed? I have the same problem, disabling prettier solves it. Alternatively, waiting for 5 minutes helps too, it will eventually show up. |
Can you run |
@joaomoreno, this is the output I see:
In a Terminal, user@DESKTOP MINGW64 /t/vunit/vunit
# git version
git version 2.24.1 The relevant part of my settings:
@divslinger, disabling/uninstalling prettier and/or waiting does not have any effect. |
Is this related to #61491? For myself, I was also realizing that if I do a clone into a local folder, that {something} should git init the folder, too. |
I'm not sure about it. For me, exactly the same repos/folders that don't work on Windows, do work if I just run a container and attach VSCode to it. Note that it is the same filesystem and the same VSCode version. Hence, I don't think it has nothing to do with the content of the folders, but with VSCode's 'Source Control' feature being broken on Windows. |
You seem to be using MSYS Git. Can you install Git for Windows instead? https://git-scm.com/ This is the only version we support. |
Unfortunately, I cannot. On some workstations I don't have admin permissions. Nevertheless, why would users install Git for Windows (which is a limited distribution) instead of using the one in MSYS2? I understand that MSYS2 can be a replacement for Git for Windows, but not the other way round. Is it possible to hide the 'Source Control' tab when it is useless? |
Sure, you can disable git with the |
I tried to do so. Unfortunately, that seems to be a global setting. As a result, when I attach to a container (where a supported git exists) I need to remember to enable it again. Is it possible to set a different behaviour when it is native vs attached? Ideally, VSCode would detect if it can show any relevant content in Source Control, and disable it otherwise. |
You can have workspace settings as well, would that work? |
The workspace/folder is the same in both contexts. So, I'm working on Windows and whenever I need a tool that is only available/supported on GNU/Linux, I run a container by sharing the root of my workspace/folder and opening it in the attached window. Then, I can work on the same project/sources with two views/windows of the same instance of VSCode: one on Windows with MSYS2 and another one in the container with the shell in it. |
Do you use the Remote Containers extension for that? |
Yes. By "attach" I mean using the "Remote - Containers" extension. |
Got it. I still suggest to install Git for Windows, as mentioned above. Can you maybe talk to your sysadmin? You can also install the Portable version. |
You can set container specific settings to enable only in a container where a supported version of git is installed. https://code.visualstudio.com/docs/remote/containers#_container-specific-settings |
@bowdenk7, containers are not created/started from VSCode, but externally. Hence, there is no @joaomoreno, I'm ok with using containers if MSYS2 is not supported by VSCode. It just seems to me that the UX could be improved slightly. It is misleading that git works perfectly when MSYS2 is used as a Terminal in VSCode, and yet the message is "No source control providers registered". Something along "No supported source control providers found" would be easier to understand. Ref #10281 |
Hey @joaomoreno, this issue might need further attention. @PeterFromSweden, you can help us out by closing this issue if the problem no longer exists, or adding more information. |
In case it was overlooked by others, the bat file in #4651 allows VSCode to partially support MSYS2's git. At least, changes are shown and "Source Control" tab is not empty. |
Issue Type: Bug
Install VS Code
Open source control.
VS Code version: Code 1.41.0 (9579eda, 2019-12-11T18:37:42.077Z)
OS version: Windows_NT x64 6.1.7601
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: