I’m trying to use Git’s include.path configuration option to include additional configuration files. However it doesn’t seem to work as expected.
Configuration files:
File: ~/.config/git/nested-config
[user]
name = xyz
File: ~/.config/git/config
[include]
path = nested-config
[core]
editor = emacs
bash
bash$ git config --global core.editor
emacs
bash$ git config --global user.name
The second command does not return “xyz” as expected. It prints nothing.
Also tried,
since git include.path supports ~, I also tried the following configuration but encountered same issue.
File: ~/.config/git/config
[include]
path = ~/.config/git/nested-config
[core]
editor = emacs
miniware is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.