问题描述:当前打开的文件夹中没有 git 存储库。但实际上有.git文件夹。
解决方案:https://github.com/microsoft/vscode/issues/139598
The only way to make it work is to use the Git: Show Git Output… command.
在vscode的查看–>命令面板,输入show git,执行后即可正确出现git 仓库。
如果执行上述命令后,git遇到错误提示:unsafe repository
执行git config --global --add safe.directory “*”。
之后再重新执行show git即可。