From: Bradford Smith Date: Mon, 16 Jul 2007 11:33:56 GMT Subject: Re: git-config: replaces ~/.gitconfig symlink with real file Message-ID: In-Reply-To: On 7/16/07, Nikolai Weibull wrote: > On 7/15/07, Bradford Smith wrote: > > Since the number of dot-files and dot-directories that I have in my > > home directory these days is somewhat overwhelming, I like to keep > > those I directly edit all together in an ~/etc directory so I can > > easily back them up and/or copy them in bulk to new accounts. So, > > several of my home dot-files are just symlinks to something in ~/etc, > > including ~/.gitconfig. > > How about adding an environment variable telling Git where to find > user-global .gitconfig instead? > > home directory these days is somewhat overwhelming, I like to keep > > those I directly edit all together in an ~/etc directory so I can > > easily back them up and/or copy them in bulk to new accounts. So, > > several of my home dot-files are just symlinks to something in ~/etc, > > including ~/.gitconfig. > > How about adding an environment variable telling Git where to find > user-global .gitconfig instead? Thanks for suggesting that. Actually, by looking at the code I discovered I could use the environment variable GIT_CONFIG to specify where the configuration file is, and I have already changed my setup to use this. Unfortunately, I found the documentation for this variable in git-config(1) confusing or I would have used it before. If I get the chance, I'll submit a patch for git-config.txt, and maybe for git.txt as well, since it lists lots of other environment variables but not GIT_CONFIG or GIT_CONFIG_LOCAL. Thanks, Bradford