vscode: Git: Repository not detected if root folder ends in [space]

  • VSCode Version: 1.38.1
  • OS Version: MacOS High Sierra 10.13.6

Steps to Reproduce:

  1. Fresh Git install (git version 2.23.0)
  2. Fresh VSCode install (1.38.1)
  3. Source Control tab in activity bar shows no source control provider registered
  4. Settings shows in settings.json: "git.enabled": true
  5. Find git location in terminal "/usr/local/bin/git"
  6. Added "git.path": "/usr/local/bin/git"to settings.json to attempt to fix the bug
  7. Source Control tab in activity bar shows still shows “no source control provider registered”
  8. When clicking on the + sign on top right corner of Source Control tab, it add a .gitfolder in the workspace folder. Confirmed by ls -al ./
  9. Trying Git: Show Git Output=> Looking for git in: /usr/local/bin/git Using git 2.23.0 from /usr/local/bin/git
  10. Checked @builtin Git Extension enabled

Does this issue occur when all extensions are disabled?: Yes

I have just started to use VSCode, but my git installation is not detected by the Source Control Tab. If I work in a directory without using git, I can initialize a .git folder with the + sign, but I can’t make commit. If I am in a directory with already a git tracking, I still have this no source control provider registered message.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 30 (12 by maintainers)

Commits related to this issue

Most upvoted comments

Turns out it wasn’t VS Code that was the problem, I had recently updated Xcode and had to agree to new TOS. Once I did that git started working again.

Another use is reporting similar issue microsoft/vscode-java-pack#222