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

[PATCH 2/2] Document toplevel gitconfig file

From
Nathan W. Panike <nathan.panike@gmail.com>
Date
Nov 25, 2010, 20:01 UTC
Message-ID
<f15d6598e5e90de3bcdb8caf706735ac4809ad36.1290870042.git.nathan.panike@gmail.com>
In-Reply-To
<cover.1290870041.git.nathan.panike@gmail.com>
Try to explain its security implications and how to turn it off.
Signed-off-by: Nathan W. Panike <nathan.panike@gmail.com>
---
 Documentation/config.txt |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 6a6c0b5..6ec9a0b 100644
--- 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.  Note that this is a security issue
+because you are basically allowing someone else to dictate your
+configuration, but should be fine if you pay attention and do not use
+aliases from someone else blindly.
+
 The configuration variables are used by both the git plumbing
 and the porcelains. The variables are divided into sections, wherein
 the fully qualified variable name of the variable itself is the last
-- 
1.7.3.2.347.gd33a62
Previous: Thiago FarinaNext: Jonathan Nieder
Message 4 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.