我们通过文件路径访问共享git存储库,由于各种原因我现在将省略,使用--shared = group创建.
我们有各种unix组,但都有一个共同的组.如果我在git存储库上运行chgrp -R,每个人都可以从中读取,但是如果有人写入它,则通常会创建不使用公共组的新文件.
这个问题似乎是因为我们的主要组不是共享组,如果我们运行newgrp,似乎一切都运行良好.
但是这种方法存在问题; newgrp很慢,它产生了一个新shell,这让我觉得在.bash_profile中调用它会是一个坏主意,甚至不考虑我们是否希望我们所有的新文件都使用公共组.在做任何git工作之前依靠内存来运行它似乎也是灾难的一个秘诀.
那么......有什么建议吗?
我有一个基本存储库,它位于UNC\machine\share ....等.我有一个本地克隆,我在主分支工作,偶尔合并到"稳定"分支.
通常我做一个
git push --all
将所有分支中的所有更改移动到服务器.创建新分支后
git branch MultiCompany
然后将其推送到服务器
git push --all
这也在服务器上创建了分支.我做了一些工作,在多公司分支中提交了所有更改然后尝试做了
git push --all
并得到以下错误:
cdturner@OAHU ~/desktop/git sourcetree/maerekai.web.framework (multicompany)
$ git push --all
Counting objects: 28, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (23/23), 11.34 KiB, done.
Total 23 (delta 8), reused 0 (delta 0)
Unpacking objects: 100% (23/23), done.
error: Ref refs/heads/multicompany is at bd5a32df35ce8d5ae30ce999af34c4c5f35581df but expected 0000000000000000000000000000000000000000
remote: error: failed to lock refs/heads/multicompany
To //pluto/users/cdturner/Git …Run Code Online (Sandbox Code Playgroud)