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

Re: Possible BUG in 'git config'

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Feb 11, 2007, 16:24 UTC
Message-ID
<Pine.LNX.4.63.0702111720260.22628@wbgn013.biozentrum.uni-wuerzburg.de>
In-Reply-To
<e5bfff550702110613q315e1f7es4ca1a88b92e4c3e9@mail.gmail.com>
Hi,
On Sun, 11 Feb 2007, Marco Costalba wrote:
> I would expect git repo-config user.name returns an empty string, 
> because user.name is defined _only_ in global config file ~/.gitconfig

The whole point of ~/.gitconfig is to store variables to be seen in _all_ repositories.

> How it is possible to know if a variable is stored in local config file?
If you _have_ to, you can use
	$ GIT_CONFIG=.git/config git config -l
but I _strongly_ suggest you rethink your workflow if you need that.

$HOME/.gitconfig _really_ is only meant to make it unnecessary to set a variable in _all_ your repositories, and you can even override (although not unset) the variables locally.

So I am certain that you made a mistake when you need to ignore the settings in $HOME/.gitconfig.

Hth, Dscho

Previous: Marco CostalbaNext: Marco Costalba
Message 2 of 5 in “Possible BUG in 'git config'”
  1. Marco CostalbaFeb 11, 2007
  2. Johannes SchindelinFeb 11, 2007
  3. Marco CostalbaFeb 11, 2007
  4. Johannes SchindelinFeb 11, 2007
  5. Marco CostalbaFeb 11, 2007

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.