Global .git directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]