Skip to content

SCM: Viewlet should improve "no repositories" messaging #61491

Closed

Description

Issue Type: Bug

This is a new installation of VS Code and Git.
I've reviewed other issues and I have verified the following:

  1. Git can be found on the path. Git: Show Git Output displays:

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

  1. This is a brand new install of VS Code and a new install of Git.

  2. The extension is enabled (I did try disabling and reenabling), no luck.

  3. 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
Item Value
CPUs Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 3396)
GPU Status 2d_canvas: enabled
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
Memory (System) 15.96GB (4.15GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none

Activity

  1. stevehurcombe commented on Oct 22, 2018

    @stevehurcombe
    Author

    Screenshot.
    snap 2018-10-22 at 14 06 34

  2. vscodebot commented on Oct 22, 2018

    @vscodebot
  3. joaomoreno commented on Oct 22, 2018

    @joaomoreno
    Contributor

    Did you open a git repository at all?

  4. added
    info-needed
    on Oct 22, 2018
  5. stevehurcombe commented on Oct 22, 2018

    @stevehurcombe
    Author

    From within VS Code? No, there is no option to do that.

  6. stevehurcombe commented on Oct 23, 2018

    @stevehurcombe
    Author

    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!

  7. joaomoreno commented on Oct 23, 2018

    @joaomoreno
    Contributor

    Yup, I totally agree. You're not the first one to think that.

    I'll rename this issue accordingly.

  8. added
    feature-request
    scm
    and removed
    git
    info-needed
    on Oct 23, 2018
  9. removed this from the Backlog milestone on Oct 23, 2018
  10. 22 remaining items

  11. rhires commented on Nov 11, 2019

    @rhires

    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...

  12. SnoopyGeeek commented on Nov 26, 2019

    @SnoopyGeeek

    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.

  13. rainabba commented on Nov 26, 2019

    @rainabba

    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)
    Commit: f359dd6
    Date: 2019-11-25T14:54:45.096Z
    Electron: 6.1.5
    Chrome: 76.0.3809.146
    Node.js: 12.4.0
    V8: 7.6.303.31-electron.0
    OS: Windows_NT x64 10.0.18362
    Git: 2.17.1 (WSL), 2.24.0.windows.2 (Windows)

  14. rainabba commented on Nov 26, 2019

    @rainabba

    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
  15. bowdenk7 commented on Jan 16, 2020

    @bowdenk7

    Right now unless you are in a folder with an active source control provider, you get the following:
    alt text

    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:

    • you want to use git
      • git is not installed
      • git is installed
        • not in a folder
        • in a folder without an initialized repo
    • you want to use other version control (we'll call this svn/etc)
      • svn/etc is not installed
      • svn/etc is installed
        • extension is not installed

    Proposal

    First 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
    alt text
    Links:

    if we do detect a git installation - we assume you want to use git

    • if there isn't a folder open - instruct the user to open a folder to get started (or clone a repository from GitHub?)

    alt text

    Clone from GitHub would trigger the existing Git: Clone command

    • if there is a folder open with no .git folder - provide the option to git init for the user

    alt text

  16. rhires commented on Jan 17, 2020

    @rhires

    Bowden Kelly (@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!

  17. joaomoreno commented on Feb 17, 2020

    @joaomoreno
    Contributor

    Bowden Kelly (@bowdenk7) Since #89080 has landed, I have adopted it in Git. We now cover the following cases:

    Git extension is disabled

    image

    No git installation found

    image

    No open folder

    image

    No .git in current folder

    image

    No .git in current workspace

    image

  18. MadhaviGunapati610 commented on Feb 18, 2020

    @MadhaviGunapati610

    click on extension type disabled you will see all disabled extension on of them will be git just enable(workstation)

    Thank you. It is working perfect.

  19. locked and limited conversation to collaborators on Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-requeston-testplanscm

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions