[英]How do I setup git with no central repository?
Three of us in the office are on Mac laptops and we use git day to day. 办公室里的三个人都在Mac笔记本电脑上,我们每天都使用git。
We want to share a repo with each other without setting up a central repo. 我们希望彼此共享一个回购,而无需设置中央回购。
Dave pushes to Sally who pushes to Chandu. 戴夫推着推向Chandu的Sally。
Chandu can pull from Sally and Dave. Chandu可以从Sally和Dave拉出来。
Is there a good way to do this? 有没有办法做到这一点?
It is perfectly compatible with the "Decentralized" notion of a DVCS like Git, and very easy to setup (all you need is sharing paths between the repos) 它完全兼容像Git这样的DVCS的“分散式”概念,并且非常容易设置(所有你需要的是在回购之间共享路径)
The only issues to address are: 唯一需要解决的问题是:
Just pull from each other :) 只是互相拉扯:)
Instead of pushing, just make a pull request (verbally, on IRC, or however you want); 而不是推动,只需提出拉动请求(口头上,在IRC上,或者你想要的); ask people to pull from you.
请人们拉你。
What you need to do is to setup a bare remote git repo. 你需要做的是设置一个裸的远程git仓库。 Check instructions here.
检查说明。
http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository http://toolmantim.com/thoughts/setting_up_a_new_remote_git_repository
If you want to be able to push to/pull from each other while offsite, you're going to need some kind of VPN so your laptops can talk to each other. 如果您希望能够在异地之间相互推送/拉动,那么您将需要某种VPN,以便您的笔记本电脑可以相互通信。 It might be easier to set up a remote repository (or a set of them, one each) on a server somewhere, because that deals with the laptops being offline when you want to merge.
在某个地方的服务器上设置一个远程存储库(或一组,每个一个)可能更容易,因为它可以处理要合并时笔记本电脑处于脱机状态。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.