git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git config --global not picking up includes

From
JGJim Garrison <jim@garrison.cc>
Date
Jan 19, 2015, 19:37 UTC
Message-ID
<54BD5CE6.2060309@garrison.cc>

I have found that `git config --global` does not pick up any include directives in the git config file.

For instance, my ~/.gitconfig contains the following:
     [include]
         path = /home/garrison/gitconfig-include
And ~/gitconfig-include in turn contains
     [user]
         name = Jim Garrison

However, when I pass the --global flag to git config, my name is not picked up:

     $ git config --global user.name
     $ git config user.name
     Jim Garrison

If I instead replace .gitconfig with the contents of gitconfig-include (and in turn remove the include step), everything works as expected.

     $ git config --global user.name
     Jim Garrison
     $ git config user.name
     Jim Garrison
I am using the latest git master, built on Debian jessie.
Next: Jeff King
Message 1 of 2 in “git config --global not picking up includes”
  1. Jim GarrisonJan 19, 2015
  2. git-config: better document default behavior for `--include`Jeff King, Jan 19, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.