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

How to to override repository-specific attributes in.git/config?

From
Rroylee17 <roylee17@gmail.com>
Date
Apr 2, 2010, 17:30 UTC
Message-ID
<1270229402991-4843642.post@n2.nabble.com>
Hi,

Do we currently have a native way to override attributes specified in the repository-specific .git/config ?

While working with a large project which is composed by multiple repositories, from time to time, I'd like to override *some* attributes without modifying each of the repository-specific config files.

For example, when such a project was copied or moved from a window file system, all files got filemode changed. Even worse, their are many uncommitted changes! In this case, I'd like to filter out the filemode changes(with core.filemode=false) when review the uncommitted changes. Since the core.filemode attribute was specified in the repository-specific config, modifying the ~/.gitconfig does not help.

The aforementioned situation is not the only case that I'd like to have such function. Do we currently have a native way to solve this? For example, to provide an extra config file via environment variable or directly feed the attributes via environment variable to override only *some* but not *all* of attributes specified in the repository-specific config.

I found this thread "Introduce the GIT_CONFIG_EXTRA environment variable" initiated by Miklos Vajna, did provide a solution to my problem, which is complete different use case though. :-) So I initiate another thread to discuss the use case here.

Thanks.
Roy
-- 
View this message in context: http://n2.nabble.com/How-to-to-override-repository-specific-attributes-in-git-config-tp4843642p4843642.html
Sent from the git mailing list archive at Nabble.com.
Message 1 of 1 in “How to to override repository-specific attributes in.git/config?”
  1. roylee17Apr 2, 2010

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.