threads / discuss / 10177

Repository specific config file

Subject: Repository specific config file

## tl;dr

2 messages between Oct 7, 2007 and Oct 7, 2007.

replies: 1people: 2as markdown or json

Pekka Riikonen· Oct 7, 2007, 08:37 UTC · lore
Hello,

Has there been any discussion or considerations adding a repository specific config file that would be delivered to all cloned repositories automatically? This would allow the publisher of the repository to set up some default settings to all developers cloning the repository. This could be useful to set up things like default aliases to ease up the work, to set that all remote branches are tracked, to list the configurations of submodules (so that people don't have to run submodule init), etc.

User should still be able to add configurations that overlap with the remote configuration and user should be able to ignore everything that came from the parent. Using ~/.gitconfig and /etc/gitconfig doesn't always work well when the developers don't have access to the remote machine (other than to clone the repository). Maybe the simplest solution would be to just add .gitconfig to the repository itself.

 	Pekka
________________________________________________________________________
  Pekka Riikonen                                 priikone at silcnet.org
  Secure Internet Live Conferencing (SILC)       http://silcnet.org/
Johannes Schindelin· Oct 7, 2007, 16:06 UTC · re: Pekka Riikonen · lore

Re: Repository specific config file

Hi,
On Sun, 7 Oct 2007, Pekka Riikonen wrote:
> Has there been any discussion or considerations adding a repository 
> specific config file that would be delivered to all cloned repositories 
> automatically? This would allow the publisher of the repository to set 
> up some default settings to all developers cloning the repository.

Sure! Just check in the file "gitconfig" and tell the good users that they can append it to their config with "cat gitconfig >> .git/config".

Or have a script "gitconfig.sh" containing calls to "git config" which the users can execute.

But you should not _force_ people to have a certain config. It's their choice.

Ciao, Dscho

← back to recent threads