简体   繁体   中英

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.

Docker Desktop is working fine, also Everything is working fine as I can perform build, clean and test.
I cannot commit changes because there is not git repository.

No Git in DevContainer:
显示没有 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)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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