When using Dev Containers in VS Code, the local ~/.gitconfig is automatically copied into the container. This allows Git inside the container to use my user settings seamlessly.
This behavior is described in the official documentation:
However, when using the Dev Container extension in Cursor (provided by Anysphere), this automatic copying doesn’t seem to happen. As a result, Git inside the container doesn’t pick up my user configuration.
Currently, I’m working around this issue by manually adding the following mounts setting to devcontainer.json:
Hi @Koizumi_Ryo and @brainomite, could you upgrade to version 1.0.9 of the Anysphere Remote Containers extension? This version will copy the .gitconfig into the container.
Hi @penor, thanks for flagging this issue – we have fixed it in version 1.0.16 of the Anysphere Remote Containers extension. If you were using Docker over WSL, you’ll also need to upgrade to version 1.0.8 of the Anysphere Remote WSL extension.