简体   繁体   English

Git有一个中央存储库

[英]Git with a central repository

I've just set up a repository on my server. 我刚在服务器上设置了一个存储库。 I'd like to use it with a small group of developers. 我想和一小群开发人员一起使用它。 We want to have a central repository shared among us. 我们希望在我们之间共享一个中央存储库。 We don't have experience with Git, but we want to learn. 我们没有Git的经验,但我们想学习。 I have followed this instructions . 我遵循了这个指示

On the server: 在服务器上:

$ git init --bare --shared foo.git
Initialized empty shared Git repository in /git/foo.git/
$ chgrp -R dev foo.git

On the clients: 在客户端:

$ git clone ssh://<my_server>/git/foo.git

Then each client will be able to make changes and push them to the server and pull changes from other users. 然后,每个客户端都可以进行更改并将其推送到服务器并从其他用户提取更改。

I want to ask you girls and guys if this configuration is correct. 我想问你女孩和男人这个配置是否正确。 It seems so simple that I was doubting about its correctness??? 看起来很简单,我怀疑它的正确性???

Yep, that's about right. 是的,那是对的。 There's one more option you'd probably want to set: core.sharedRepository which tells Git that when it creates additional directories, it should chgrp them to that group. 还有一个你可能想要设置的选项: core.sharedRepository告诉Git,当它创建其他目录时,它应该将它们chgrp到该组。

There's a good writeup on how to set it at http://criticallog.thornet.net/2010/01/07/sharing-your-git-repository/ 关于如何在http://criticallog.thornet.net/2010/01/07/sharing-your-git-repository/上设置它有一个很好的写作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM