Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
177 views
in Technique[技术] by (71.8m points)

git - 有效地同时使用Git和Dropbox?(Using Git and Dropbox together effectively?)

如何有效地一起使用GitDropbox

  ask by n1kh1lp translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think that Git on Dropbox is great.

(我认为Dropbox上的Git很棒。)

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.

(我有多台计算机(两台在家,一台在工作),我将Dropbox用作中央裸仓库。)

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.

(由于我不想将其托管在公共服务上,并且我无法访问总是可以通过ssh连接到的服务器,因此Dropbox通过在后台同步(非常快)来解决此问题。)

Setup is something like this:

(安装程序是这样的:)

~/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

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.

(从那里,您可以克隆与您的Dropbox帐户关联(或与他人共享此目录)的~/Dropbox/git/project.git ,您可以执行所有正常的Git操作,它们将同步到您的所有其他机器自动。)

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.

(我写了一篇关于版本控制的博客文章( 旧的链接已 失效 ),介绍了我的推理以及如何设置环境,该文章基于我在Ruby on Rails上的开发经验,但实际上它可以应用于任何东西。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...