Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

Re: git-config: replaces ~/.gitconfig symlink with real file

From: Bradford Smith <hidden>
Date: 2016-06-15 22:43:21

On 7/16/07, Nikolai Weibull [off-list ref] wrote:
On 7/15/07, Bradford Smith [off-list ref] wrote:
quoted
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?
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help