Git 允许在一个组中创建共享存储库:
git --bare init --shared=group
但是 - 如何将现有的存储库更改为共享?我不想重新 git-init 它。
最佳答案
根据documentation :
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]
Specify that the git repository is to be shared amongst several users. This allows users belonging to the same group to push into that repository. When specified, the config variable "core.sharedRepository" is set so that files and directories under
$GIT_DIR
are created with the requested permissions. When not specified, git will use permissions reported by umask(2).
因此,为了改变权限,chmod
一切随心所欲,set the core.sharedRepository
in git config因此:
git config core.sharedRepository true
关于git - 将 GIT 存储库更改为共享,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7268560/