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

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

From
Bradford Smith <bradford.carl.smith@gmail.com>
Date
Jul 16, 2007, 11:33 UTC
Message-ID
<f158199e0707160433v27fe7073w9c550712c41c32e8@mail.gmail.com>
In-Reply-To
<dbfc82860707160237v6772b5b8o541f2045ccd824d5@mail.gmail.com>
On 7/16/07, Nikolai Weibull <now@bitwi.se> wrote:
Show 18 quoted lines
> On 7/15/07, Bradford Smith <bradford.carl.smith@gmail.com> 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
Previous: Nikolai WeibullNext: Bradford Smith
Message 4 of 21 in “git-config: replaces ~/.gitconfig symlink with real file”
  1. Bradford SmithJul 15, 2007
  2. Johannes SchindelinJul 15, 2007
  3. Nikolai WeibullJul 16, 2007
  4. Bradford SmithJul 16, 2007
  5. Bradford SmithJul 16, 2007
  6. Junio C HamanoJul 16, 2007
  7. 0/2 git-config should not replace symlinkBradford C. Smith, Jul 25, 2007
  8. 1/2 resolve symlinks when creating lockfilesBradford C. Smith, Jul 25, 2007
  9. 2/2 use lockfile.c routines in git_commit_set_multivar()Bradford C. Smith, Jul 25, 2007
  10. Junio C HamanoJul 25, 2007
  11. fully resolve symlinks when creating lockfilesBradford C. Smith, Jul 26, 2007
  12. Johannes SchindelinJul 26, 2007
  13. Morten WelinderJul 26, 2007
  14. Bradford SmithJul 27, 2007
  15. Junio C HamanoJul 27, 2007
  16. Johannes SchindelinJul 17, 2007
  17. Matthieu MoyJul 17, 2007
  18. Fredrik TolfJul 17, 2007
  19. Johannes SchindelinJul 17, 2007
  20. Catalin MarinasJul 17, 2007
  21. Johannes SchindelinJul 17, 2007

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.