visual-studio-codegit-for-windows

Git repository is not recognized unless VSCode is opened as administrator


I have git installed, according to the CLI, it's version '2.36.0.windows.1'.
I have the latest VSCode, version '1.69.1 (user setup)'.
I am on Windows 10 Home, version '21H2 (build 19044)'.

I have a folder which contains my project and a .git subfolder. Everything works as intended, if I run VSCode as an administrator. If not, the git repository is not initialized and changes are not tracked.

This is not a huge deal, but i'd actually like to not have to run as administrator. As far as I can tell the folder (single folder workspace) is trusted, so that shouldn't be it either.

Is there something I am missing, or is this a bug?


Solution

  • When running git status it said that the repository was owned by someone else and that it was not trusted. It also suggests a command to fix that. After running this command and restarting vscode, I had my repository as non administrator, so everything was working.