Re: ~/.git/config ?

From: Junio C Hamano <>
Date: 2006-05-27 19:11:23
Linus Torvalds <> writes:

> On Sat, 27 May 2006, Petr Baudis wrote:
>> ~/.gitrc might get useful for actually doing what ~/.cvsrc or ~/.cgrc
>> does, that is providing default options for git commands. ~/.gitconfig
>> would just give you per-user defaults for the repository config file.
> I don't think the two are necessarily any different.

Me neither.  Default options to fall back on if repository
configuration does not specify them and when environments do not
override them -- that's exactly "per-user defaults", nothing else.

Earlier I suggested ~/.git-config, but anything other than
~/.git/config is OK.  ~/.gitrc is fine.  And the order suggested
by Anand sounded fine.

 - use environment (if the value is obtained, stop here)
 - use .git/config (if the value is obtained, stop here)
 - use ~/.git-config (if the value is obtained, stop here)
 - do whatever the program does by default.

>  (a) we might as well use the same syntax. There's no point in having 
>      different syntax for the files, even if they end up having slightly 
>      different usage.


>  (b) a "user-wide" config file would tend to have different things in it 
>      than a per-repository one, but some of the things it would have in it 
>      are the things that we currently put in the per-repository one. 
>      Notably exactly the "" and "" values.

Yes.  Also "preference" kind of things as opposed to "per
project policy" such as apply.whitespace.

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at
Received on Sat May 27 19:12:14 2006

This archive was generated by hypermail 2.1.8 : 2006-05-27 19:12:43 EST