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

Querying Git for the path to the system config file

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
May 20, 2015, 20:23 UTC
Message-ID
<CAHGBnuPCZCBsBXqGo26E-pcuZXZBxL8GwAehW4UziDpB2V8Npw@mail.gmail.com>
Hi,

I was in need to find out the path to the system-wide config file that Git is using. I need to do this in a platform-independent way (Linux, Mac OS X, Windows). What I came up with is

$ GIT_EDITOR=echo git config --system --edit
to trick Git into printing the path instead of opening the file in an editor.
Just wondering, is there a less hacky way to do that?
-- 
Sebastian Schuberth
Next: Jeff King
Message 1 of 3 in “Querying Git for the path to the system config file”
  1. Sebastian SchuberthMay 20, 2015
  2. Jeff KingMay 20, 2015
  3. Sebastian SchuberthMay 20, 2015

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.