{"thread":{"id":"25018","subject":"Propagating config to clones/pulls","startedAt":"2010-09-07T08:56:57Z","lastAt":"2010-09-08T03:08:13Z","messageCount":5,"participants":["Douglas Tan","Thomas Rast","David Aguilar","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"150200","messageId":"A8F08AD5-6DB5-4A4D-9A8F-79DDBD93E666@getgosu.com","threadId":"25018","inReplyTo":null,"subject":"Propagating config to clones/pulls","fromName":"Douglas Tan","fromEmail":"douglas@getgosu.com","sentAt":"2010-09-07T08:56:57Z","receivedAt":"2010-09-07T08:56:57Z","isPatch":false,"sender":{"key":"douglas@getgosu.com","avatar":null},"body":"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?"},{"id":"150201","messageId":"201009071123.21011.trast@student.ethz.ch","threadId":"25018","inReplyTo":"A8F08AD5-6DB5-4A4D-9A8F-79DDBD93E666@getgosu.com","subject":"Re: Propagating config to clones/pulls","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2010-09-07T09:23:20Z","receivedAt":"2010-09-07T09:23:20Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Douglas Tan wrote:\n> \n> I have some config settings that I'll like to make default for\n> anyone cloning/pulling from the central remote bare repository. I've\n> tried to do this by editing the config file in the bare repository\n> on the server but the change doesn't appear when cloning. How can I\n> go about pushing default config settings to anyone cloing or pulling\n> from the repository?\n\nYou can't, since that would open a whole range of security issues.\n\nYou can put some config defaults inside the repository itself, but it\nis up to your users whether they apply them.  Perhaps it's best to\nwrite them as a shellscript that adds to the configuration file(s) so\nthat it is easy to apply it later, e.g.,\n\n  #!/bin/sh\n  git config diff.jpg.textconv exiftool\n  cat >> .gitattributes <<EOF\n  *.jpg diff=jpg\n  EOF\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"150205","messageId":"AANLkTikbCTRKpN7w=-xoj8uKvSV1X2U8fnhXgva=oA=8@mail.gmail.com","threadId":"25018","inReplyTo":"201009071123.21011.trast@student.ethz.ch","subject":"Re: Propagating config to clones/pulls","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2010-09-07T11:05:58Z","receivedAt":"2010-09-07T11:05:58Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On 9/7/10, Thomas Rast <trast@student.ethz.ch> wrote:\n> Douglas Tan wrote:\n>  >\n>  > I have some config settings that I'll like to make default for\n>  > anyone cloning/pulling from the central remote bare repository. I've\n>  > tried to do this by editing the config file in the bare repository\n>  > on the server but the change doesn't appear when cloning. How can I\n>  > go about pushing default config settings to anyone cloing or pulling\n>  > from the repository?\n>\n>  You can't, since that would open a whole range of security issues.\n>\n>  You can put some config defaults inside the repository itself, but it\n>  is up to your users whether they apply them.  Perhaps it's best to\n>  write them as a shellscript that adds to the configuration file(s) so\n>  that it is easy to apply it later, e.g.,\n>\n>   #!/bin/sh\n>   git config diff.jpg.textconv exiftool\n>   cat >> .gitattributes <<EOF\n>   *.jpg diff=jpg\n>   EOF\n>\n>  --\n>  Thomas Rast\n>  trast@{inf,student}.ethz.ch\n\nAlso.. if you happen to have administrator access to their machines\n(or if they do) then you can roll an .rpm/.deb/etc. containing an\n/etc/gitconfig and install it on their machines.  That'll apply these\nsettings globally without them having to run a script everytime a repo\nis cloned.\n-- \n    David\n"},{"id":"150255","messageId":"i66bas$q4t$1@dough.gmane.org","threadId":"25018","inReplyTo":"A8F08AD5-6DB5-4A4D-9A8F-79DDBD93E666@getgosu.com","subject":"Re: Propagating config to clones/pulls","fromName":"Neal Kreitzinger","fromEmail":"neal@rsss.com","sentAt":"2010-09-07T21:36:23Z","receivedAt":"2010-09-07T21:36:23Z","isPatch":false,"sender":{"key":"neal@rsss.com","avatar":null},"body":"\"Douglas Tan\" <douglas@getgosu.com> wrote in message \nnews:A8F08AD5-6DB5-4A4D-9A8F-79DDBD93E666@getgosu.com...\n>I have some config settings that I'll like to make default for anyone \n>cloning/pulling from the central remote bare repository. I've tried to do \n>this by editing the config file in the bare repository on the server but \n>the change doesn't appear when cloning. How can I go about pushing default \n>config settings to anyone cloing or pulling from the repository?--\n\nBased on the assumption that your \"child\" repos are supposed to have the \nsame .git/config files, I tried using git-init --template=x with a config \nfile in template directory \"x\", but git-init only picks up the config file \non an initialization of a new repo, not on a reinitialization of an existing \nrepo.\n\nv/r,\nNeal \n"},{"id":"150268","messageId":"5892B461-8BBA-4E1D-9BC4-3EADCEA4F98E@getgosu.com","threadId":"25018","inReplyTo":"AANLkTikbCTRKpN7w=-xoj8uKvSV1X2U8fnhXgva=oA=8@mail.gmail.com","subject":"Re: Propagating config to clones/pulls","fromName":"Douglas Tan","fromEmail":"douglas@getgosu.com","sentAt":"2010-09-08T03:08:13Z","receivedAt":"2010-09-08T03:08:13Z","isPatch":false,"sender":{"key":"douglas@getgosu.com","avatar":null},"body":"Thanks for the suggestions, I think I'll have everyone cloning the repositories to add the configuration settings in ~/.gitconfig instead.\n\nOn 07/09/2010, at 7:05 PM, David Aguilar wrote:\n\n> On 9/7/10, Thomas Rast <trast@student.ethz.ch> wrote:\n>> Douglas Tan wrote:\n>>> \n>>> I have some config settings that I'll like to make default for\n>>> anyone cloning/pulling from the central remote bare repository. I've\n>>> tried to do this by editing the config file in the bare repository\n>>> on the server but the change doesn't appear when cloning. How can I\n>>> go about pushing default config settings to anyone cloing or pulling\n>>> from the repository?\n>> \n>> You can't, since that would open a whole range of security issues.\n>> \n>> You can put some config defaults inside the repository itself, but it\n>> is up to your users whether they apply them.  Perhaps it's best to\n>> write them as a shellscript that adds to the configuration file(s) so\n>> that it is easy to apply it later, e.g.,\n>> \n>>  #!/bin/sh\n>>  git config diff.jpg.textconv exiftool\n>>  cat >> .gitattributes <<EOF\n>>  *.jpg diff=jpg\n>>  EOF\n>> \n>> --\n>> Thomas Rast\n>> trast@{inf,student}.ethz.ch\n> \n> Also.. if you happen to have administrator access to their machines\n> (or if they do) then you can roll an .rpm/.deb/etc. containing an\n> /etc/gitconfig and install it on their machines.  That'll apply these\n> settings globally without them having to run a script everytime a repo\n> is cloned.\n> -- \n>    David\n"}]}