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

Re: Storing private config files in .git directory?

From
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Date
Jan 8, 2024, 18:56 UTC
Message-ID
<20240108-affable-azure-goldfish-b91d1a@lemur>
In-Reply-To
<8e344dee-f84e-4a2c-835a-406ee72d129b@haller-berlin.de>
On Sun, Jan 07, 2024 at 02:03:20PM +0100, Stefan Haller wrote:
> Our git client (lazygit) has a need to store per-repo config files that
> override the global one, much like git itself. The easiest way to do
> that is to store those in a .git/lazygit.cfg file, and I'm wondering if
> there's any reason why this is a bad idea?

I have considered the same question for b4 as well, but I chose to just rely on git's config file handling instead of any other option. There's a large number of people who tend to deal with weird repository situations by blowing away the entire repo and then recloning it. They may remember to back up the .git/config file, but not really anything else.

So, that would be the only consideration against keeping anything in the .git directory.

-K
Previous: Jeff KingNext: Marc Branchaud
Message 6 of 7 in “Storing private config files in .git directory?”
  1. Stefan HallerJan 7, 2024
  2. Junio C HamanoJan 8, 2024
  3. Jeff KingJan 10, 2024
  4. Stefan HallerJan 11, 2024
  5. Jeff KingJan 12, 2024
  6. Konstantin RyabitsevJan 8, 2024
  7. Marc BranchaudJan 8, 2024

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.