Thread (16 messages) flat view 16 messages, 8 authors, 2016-06-15

Global .git directory

From: Gerhard Wiesinger <hidden>
Date: 2016-06-15 22:48:43

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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help