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