一起使用Git和Dropbox? [英] Using Git and Dropbox together effectively?

查看:135
本文介绍了一起使用Git和Dropbox?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 Git Dropbox 一起有效?

推荐答案

我认为Git在Dropbox是伟大的。我使用它所有的时间。我有多台计算机(两个在家里和一个在工作),我使用Dropbox作为中央裸存储库。由于我不想在公共服务上托管它,而且我没有访问我可以总是ssh的服务器,Dropbox通过在后台同步(非常快)来处理这个问题。

I think that Git on Dropbox is great. I use it all of the time. I have multiple computers (two at home and one at work) that I use Dropbox as a central bare repository. Since I don't want to host it on a public service, and I don't have access to a server that I can always ssh to, Dropbox takes care of this by syncing (very quickly) in the background.

安装程序如下所示:

~/project $ git init
~/project $ git add .
~/project $ git commit -m "first commit"
~/project $ cd ~/Dropbox/git

~/Dropbox/git $ git init --bare project.git
~/Dropbox/git $ cd ~/project

~/project $ git remote add origin ~/Dropbox/git/project.git
~/project $ git push -u origin master

从这里,你可以克隆〜/ /git/project.git 您已经与您的Dropbox帐户(或已经与人共享此目录),您可以执行所有正常的Git操作,他们将被同步到所有其他机器自动

From there, you can just clone ~/Dropbox/git/project.git that you have associated with your Dropbox account (or have shared this directory with people), you can do all the normal Git operations and they will be synchronised to all your other machines automatically.

我写了一篇博文, On Version Control ,(旧链接 )对我的推理和我如何设置我的环境,它是基于我的 Ruby on Rails 开发经验,但它可以应用于任何东西,真的。

I wrote a blog post, On Version Control, (old link dead) on my reasoning and how I set up my environment, it's based on my Ruby on Rails development experience, but it can be applied to anything, really.

这篇关于一起使用Git和Dropbox?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆