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

Re: git config not following include paths by default

From
PSPaul S. Strauss <pss@acm.org>
Date
Jun 18, 2020, 20:40 UTC
Message-ID
<b9f47155-e6ef-5868-898d-f5a703e2fd94@acm.org>
In-Reply-To
<6aab7843-7ece-5499-c074-a5fa8ef68beb@acm.org>
Update:

The problem is related to my having GIT_CONFIG set to a file other than ~/.gitconfig - when I unset GIT_CONFIG and copied my config file to ~/.gitconfig, the include worked as expected.

So, to reproduce:
    Do NOT have a ~/.gitconfig file
    Set GIT_CONFIG to a configuration file with [include] statements
    Then the behavior I mentioned will occur
On 6/18/20 1:25 PM, Paul S. Strauss wrote:
Show 18 quoted lines
> Using git version 2.25.1 in a bash shell on Ubuntu 20.04 (focal).
>
> My global git config file has an [include] with path set to additional 
> configuration.
>
> "git config --list --show-origin --includes" shows all of my configuration, 
> including items from the included file.
>
> "git config --list --show-origin" shows only the items in my main config file. 
> Not sure why "--no-includes" is the default, but not a huge deal either way.
>
> What is a big deal is that none of the configuration in my included config 
> file is available to me. I have lots of aliases and other settings in the 
> included file, but none of them work.
>
> This can't be the expected behavior, can it? If so, then including config 
> files is pretty useless.
>
-- 
Paul S. Strauss                                  pss@acm.org
Previous: Paul S. StraussNext: Jeff King
Message 2 of 4 in “git config not following include paths by default”
  1. Paul S. StraussJun 18, 2020
  2. Paul S. StraussJun 18, 2020
  3. Jeff KingJun 19, 2020
  4. Paul S. StraussJun 19, 2020

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.