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

Global .git directory

From
GWGerhard Wiesinger <lists@wiesinger.com>
Date
Apr 27, 2010, 05:14 UTC
Message-ID
<alpine.LFD.2.00.1004270705280.15197@bbs.intern>
Hello,

I'm new to git and as far as I saw that feature is missing: Placing .git directory/repository on a central place for many git repositories. This feature ensures that data directories are kept clean from metadata of git.

I know the GIT_DIR environment variable but therefore environment has to be set for each repository which is IHMO not practicable. Therefore I suggest the following approach (which also overrides GIT_DIR when set): # Can be set globally for all users export GIT_GLOBAL_DIR=$HOME/.git_global

When this environment variable is set git searches the repository in $HOME/.git_global/`pwd` Example: cd /home/gerhard/myproject => /home/gerhard/.git_global/home/gerhard/myproject/.git directory is used cd /home/gerhard/myproject/subdir => /home/gerhard/.git_global/home/gerhard/myproject/.git directory is still used, base directory must also be searched for (algorithm must already be implemented)

I think this should be easy to implement on a centralized point.
Any feedback is welcome.
Thnx.

Ciao, Gerhard

-- http://www.wiesinger.com/

Next: Thomas Rast
Message 1 of 17 in “Global .git directory”
  1. Gerhard WiesingerApr 27, 2010
  2. Thomas RastApr 27, 2010
  3. Gerhard WiesingerApr 27, 2010
  4. Erik Faye-LundApr 27, 2010
  5. Gerhard WiesingerApr 28, 2010
  6. Tomas CarneckyApr 28, 2010
  7. Gerhard WiesingerApr 28, 2010
  8. Alex RiesenApr 28, 2010
  9. Gerhard WiesingerApr 28, 2010
  10. Erik Faye-LundApr 28, 2010
  11. Gerhard WiesingerApr 28, 2010
  12. Gerhard WiesingerMay 4, 2010
  13. Andrew RuderMay 4, 2010
  14. Andreas EricssonMay 4, 2010
  15. Gerhard WiesingerMay 4, 2010
  16. Junio C HamanoMay 4, 2010
  17. Jacob HelwigApr 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.