
In this attempt we pretend that the "global" configs are in the repository itself. $ XDG_CONFIG_HOME= HOME=$PWD git config --global section.key value $ XDG_CONFIG_HOME= HOME=$PWD git config --global section.key value $ git config --global section.key $ cat $PWD/.gitconfig [section] key = value