Git允许在一个组中创建一个共享存储库:
git --bare init --shared=group
Run Code Online (Sandbox Code Playgroud)
但是 - 如何将现有存储库更改为共享?我不想重新git-init它.
Ela*_*ich 15
根据文件:
--shared [=(假|真|的umask |组|全部|世界|人人| 0XXX)
指定git存储库将在多个用户之间共享.这允许属于同一组的用户进入该存储库.指定时,将设置配置变量"core.sharedRepository",以便
$GIT_DIR
使用所请求的权限创建下面的文件和目录.未指定时,git将使用umask(2)报告的权限.
因此,为了更改权限,chmod
一切都符合您的喜好,并相应地设置core.sharedRepository
在git配置中:
git config core.sharedRepository true
Run Code Online (Sandbox Code Playgroud)
Jan*_*ker 10
要共享私有裸仓库组:
sharedRepository = group
到该core
部分chgrp -R target-group .
find . -type d | xargs chmod g+ws
find refs -type f | xargs chmod g+w