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

Re: Propagating config to clones/pulls

From
DTDouglas Tan <douglas@getgosu.com>
Date
Sep 8, 2010, 03:08 UTC
Message-ID
<5892B461-8BBA-4E1D-9BC4-3EADCEA4F98E@getgosu.com>
In-Reply-To
<AANLkTikbCTRKpN7w=-xoj8uKvSV1X2U8fnhXgva=oA=8@mail.gmail.com>
Thanks for the suggestions, I think I'll have everyone cloning the repositories to add the configuration settings in ~/.gitconfig instead.
On 07/09/2010, at 7:05 PM, David Aguilar wrote:
Show 34 quoted lines
> On 9/7/10, Thomas Rast <trast@student.ethz.ch> wrote:
>> Douglas Tan wrote:
>>> 
>>> I have some config settings that I'll like to make default for
>>> anyone cloning/pulling from the central remote bare repository. I've
>>> tried to do this by editing the config file in the bare repository
>>> on the server but the change doesn't appear when cloning. How can I
>>> go about pushing default config settings to anyone cloing or pulling
>>> from the repository?
>> 
>> You can't, since that would open a whole range of security issues.
>> 
>> You can put some config defaults inside the repository itself, but it
>> is up to your users whether they apply them.  Perhaps it's best to
>> write them as a shellscript that adds to the configuration file(s) so
>> that it is easy to apply it later, e.g.,
>> 
>>  #!/bin/sh
>>  git config diff.jpg.textconv exiftool
>>  cat >> .gitattributes <<EOF
>>  *.jpg diff=jpg
>>  EOF
>> 
>> --
>> Thomas Rast
>> trast@{inf,student}.ethz.ch
> 
> Also.. if you happen to have administrator access to their machines
> (or if they do) then you can roll an .rpm/.deb/etc. containing an
> /etc/gitconfig and install it on their machines.  That'll apply these
> settings globally without them having to run a script everytime a repo
> is cloned.
> -- 
>    David
Previous: David AguilarNext: Neal Kreitzinger
Message 4 of 5 in “Propagating config to clones/pulls”
  1. Douglas TanSep 7, 2010
  2. Thomas RastSep 7, 2010
  3. David AguilarSep 7, 2010
  4. Douglas TanSep 8, 2010
  5. Neal KreitzingerSep 7, 2010

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.