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

Re: [PATCH 2/2] Document toplevel gitconfig file

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Nov 27, 2010, 15:52 UTC
Message-ID
<20101127155202.GA25598@burratino>
In-Reply-To
<f15d6598e5e90de3bcdb8caf706735ac4809ad36.1290870042.git.nathan.panike@gmail.com>
Nathan W. Panike wrote:
Show 13 quoted lines
> --- a/Documentation/config.txt
> +++ b/Documentation/config.txt
> @@ -8,6 +8,17 @@ is used to store the configuration for that repository, and
>  fallback values for the `.git/config` file. The file `/etc/gitconfig`
>  can be used to store a system-wide default configuration.
>  
> +One can also create a `.gitconfig` file in the toplevel of the
> +repository. This config file will then be propogated to collaborators
> +when they pull from your repository.  Only `alias` config variables are
> +allowed to be set in this `.gitconfig` file.  One can turn off the
> +shared `.gitconfig` by setting the environment variable
> +'GIT_CONFIG_NOSHARED' to 1; it will then be propogated but will not be
> +used for configuration settings.

Please no. Why not set up aliases in a setup-aliases.sh script and mention it in your README?

If I clone a repository to investigate it and then a typo results in
	$ git lgo
emptying my $HOME directory, I would not call that a feature.
Previous: Nathan W. PanikeNext: Nguyen Thai Ngoc Duy
Message 5 of 6 in “Create a shared config file”
  1. 0/2 Create a shared config fileNathan W. Panike, Nov 27, 2010
  2. 1/2 Add support for a shared config fileNathan W. Panike, Nov 25, 2010
  3. Thiago FarinaNov 27, 2010
  4. 2/2 Document toplevel gitconfig fileNathan W. Panike, Nov 25, 2010
  5. Jonathan NiederNov 27, 2010
  6. Nguyen Thai Ngoc DuyNov 27, 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.