gpt4 book ai didi

git - 将 GIT 存储库更改为共享

转载 作者:IT王子 更新时间:2023-10-29 01:30:10 26 4
gpt4 key购买 nike

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/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com