简体   繁体   English

在 Visual Studio 代码的开发容器中未检测到 Git

[英]Git isn't detected inside dev container in visual studio code

Git is not detected when I open dev container in VisualStudio Code even when I cloned the file from GitHub using SSH key.即使我使用 SSH 密钥从 GitHub 克隆文件,当我在 VisualStudio Code 中打开开发容器时,也未检测到 Git。

Docker Desktop is working fine, also Everything is working fine as I can perform build, clean and test. Docker Desktop 工作正常,一切正常,因为我可以执行构建、清理和测试。
I cannot commit changes because there is not git repository.我无法提交更改,因为没有 git 存储库。

No Git in DevContainer: DevContainer 中没有 Git:
显示没有 git

Local filesystem with cloned files:带有克隆文件的本地文件系统:
克隆文件

I'm new to this.我是新手。 If anyone can help.如果有人可以提供帮助。

Developping inside a container means you need to Open a Git repository or GitHub PR in an isolated container volume# , in order for your container filesystem to mount the right local folder (the one with a .git in it)在容器内开发意味着您需要在隔离的容器卷中打开 Git 存储库或 GitHub PR# ,以便您的容器文件系统挂载正确的本地文件夹(其中包含.git的文件夹)

https://code.visualstudio.com/assets/docs/remote/containers/architecture-containers.png

Start VS Code and run Remote-Containers: Clone Repository in Container Volume... from the Command Palette (F1).启动 VS Code 并从命令面板 (F1) 运行Remote-Containers: Clone Repository in Container Volume...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM