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

From: roylee17 <hidden>
Date: 2016-06-15 22:48:32

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help