-
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
SCM: Viewlet should improve "no repositories" messaging #61491
Comments
(Experimental duplicate detection) |
Did you open a git repository at all? |
From within VS Code? No, there is no option to do that. |
I think this might just be a confusing message. I used the console to clone a repository and when I opened the folder in VS Code the source control pane worked as I expected it to. Once I closed the folder the same message reappeared. Coming from a Visual Studio & TFS world I was expecting a different experience. IMHO the message should clarify that Git is installed and functioning, you just need to used the console to clone a repository and open it...at least that's how I think it should work. Time to watch a few videos! |
Yup, I totally agree. You're not the first one to think that. I'll rename this issue accordingly. |
click on extension type @disabled you will see all disabled extension on of them will be git just enable(workstation) |
Thanks, I did that before posting. Have a look at my last comment. The widget gave the impression that it wasn't working, when it was. |
Actually just had the exact same problem I opened vscode and it said "No source control providers registered." So I googled vscode git support and followed the documentation: https://code.visualstudio.com/docs/editor/versioncontrol#_git-support So I intalled git for window and ensured git was in the path, then just to be sure I restarted my PC I reopend vscode and still had the exact same message "No source control providers registered.", so I assumed the git installation or something related to vscode was wrong, so I googled again and found this ticket first: #61522 in that ticket someone has the exact same problem, one comment said to press CTRL+SHIFT+P and then enter "Git: Show Git Output", which gave me:
so I realised vscode was indeed finding git, but somehow was expecting me to already have a git repo opened and finally the next comment of that ticket had the suggested solution which consisted off manually creating a folder and do a manual git clone first, So I went to the explorer opened a blank folder, then I opened a new vscode terminal panel, entered my git command, which opened the GitHub login window: and after login in it successfully cloned my repository and I could use git as expected. Next time I reopened vscode it had finally realized that git is installed and working and hence did not show the "No source control providers registered." message anymore in the ticket #61522 it says to come to this ticket here to see if the git workflow could be improved, this is why I wrote this explanation So in my opinion it would be great if after installing git, vscode would at least show another message, even better would be if there was a button that says checkout your first repo or login to your git service provider and open a login panel, you click it, enter your credentials or the repo url and bam you are done :) |
And that's also why I am here --> also confused about the "No source control providers registered". |
I don't know if there is a difference between some of the images posted above. For example, @chrisweb has the Git Logo on his sidebar. I have also seen the 3 horizontal dots on some images. However, my VS Code is just like @stevehurcombe where there is no Git logo and not 3 horizontal dots. There are no actions for me to take from the UI to fix this issue. That's just bad UX |
I propose adding just a tiny bit more info.
where clicking the word terminal, will indeed just open a terminal. |
You know what people must do. They must clone a git repo. The set of commands to do that are very limited. Why not just allow users to enter in a |
Has this issue been solved? I have suddenly been getting the When using
My repository is cloned from GitHub and has a When initialising a git repo I get this error:
What can I do to get git working again in VS Code? |
@KokoDoko Did you configure |
SOLVED!!! I just upgraded VS Code to the latest and had the same issue. What solved the issue? The solution posted by @pramodnitmz For some reason, during the upgrade the "Git" extension was disabled. All i had to do was go the the "extensions", then type |
See https://stackoverflow.com/questions/46609255/git-missing-in-vs-code-no-source-control-providers for a sample of some confusion caused by this message. |
Just got moved to a new machine at work, and this issue popped up. I agree with someone who said that the message should say "Git is installed/working (whatever), but you're not in a git enabled repository. Would you like to create a new one or open a folder that has one?" well, that's the gist of it, anyway. And then those two options should be available for the user to act on... |
Hi, I solve this problem by changing the order of environment variables paths. Specifically, I move my desired searching scope of git upper and the problem just went away once I did so. |
Fresh install of VSCode and Git on a brand new Windows 10 machine and despite git working in Terminal, PowerShell and WSL, AND the GitLab flow extension working, Source Control still reports "No source control providers registered". I've also tried after removing GitLab Flow and restarting just in case. GitLens extension is working as expected as well. I have no disabled extensions. Authentication is working fine (I can use any of my terminals to successfully fetch). SmartGit works as expected when fired up (the point is to not have to though). Version: 1.40.2 (system setup) |
As I'm now seeing "fatal: not a git repository (or any of the parent directories)", I wonder if it has nothing to do with Git or our projects, just the context the commands are run in. Using git 2.24.0.windows.2 from C:\Program Files\Git\cmd\git.exe
> git rev-parse --show-toplevel
fatal: not a git repository (or any of the parent directories): .git |
Right now unless you are in a folder with an active source control provider, you get the following: I think we should be able to provide a little more direction. A user can be in a few different states when they're looking at this message:
ProposalFirst we detect whether there is a working git installation: If we don't detect git installation - show instructions on how/where to install git and a note about how to use other scm providers
if we do detect a git installation - we assume you want to use git
|
@bowdenk7 - I think you should just copy/paste what you wrote as a new request, because it's about much more than messaging. And this is a fantastic proposal! |
@bowdenk7 Since #89080 has landed, I have adopted it in Git. We now cover the following cases: Git extension is disabled No git installation found No open folder No No |
Thank you. It is working perfect. |
Issue Type: Bug
This is a new installation of VS Code and Git.
I've reviewed other issues and I have verified the following:
Looking for git in: C:\Program Files\Git\cmd\git.exe
Looking for git in: C:\Program Files (x86)\Git\cmd\git.exe
Looking for git in: C:\Program Files\Git\cmd\git.exe
Looking for git in: d:\Program Files\Git\cmd\git.exe
Using git 2.19.1.windows.1 from d:\Program Files\Git\cmd\git.exe
This is a brand new install of VS Code and a new install of Git.
The extension is enabled (I did try disabling and reenabling), no luck.
There are no icons on the source control pane, nor any ellipsis menus (...).
VS Code version: Code 1.28.2 (7f3ce96, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: