Dev containers do not forward the XDG Git config at ~/.config/git/config
Reproduction steps
On the host, store the user-level Git configuration only at the documented XDG path:
~/.config/git/configDo not create
~/.gitconfig.Open a project in a Zed dev container.
Inspect the Git configuration available inside the container.
Observe that the host's XDG Git configuration was not forwarded.
On the host, add this workaround and rebuild/reopen the dev container:
ln -s ~/.config/git/config ~/.gitconfigObserve that Zed now finds and forwards the configuration through
~/.gitconfig.
Git documents both ~/.gitconfig and $XDG_CONFIG_HOME/git/config (normally ~/.config/git/config) as user-specific configuration files: https://git-scm.com/docs/git-config#FILES
Current vs. Expected behavior
Current behavior
Zed's dev-container integration looks for ~/.gitconfig, but does not account for the XDG user config at ~/.config/git/config. Users who keep their Git configuration only in the XDG location must create a host-side ~/.gitconfig symlink or duplicate the file for it to be available in the container.
Expected behavior
Zed should detect and forward the XDG Git configuration path as well as ~/.gitconfig, placing each file at its corresponding path inside the container and preserving Git's normal configuration precedence when both exist.
The XDG path is especially common for users who keep application configuration under ~/.config and avoid legacy dotfiles directly in $HOME.
Zed version and system specs
Zed host version/specs are not available from inside the active dev container.
Dev container:
OS: Debian GNU/Linux 13 (trixie)
Kernel: Linux 6.12.107+deb13-amd64
Architecture: x86_64
Git: 2.47.3
Attach Zed log file
No relevant log output was observed; this concerns which host configuration paths are forwarded while creating/opening a dev container.
Relevant Zed settings
No relevant custom Zed settings.
Relevant Keymap
No relevant custom keymap.
If you are using WSL on Windows, what flavor of Linux are you using?
Not using WSL.
Source: zed-industries/zed