流动学生如何才能将Dropbox与源代码控制系统一起有效使用? [英] How can a mobile student effectively use Dropbox with a source control system?

查看:58
本文介绍了流动学生如何才能将Dropbox与源代码控制系统一起有效使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为下一学期准备了一台笔记本电脑,这将使我在全职工作的同时参加大学编程课程。当然,我将使用源代码控制系统(可能是Subversion),并想到了在我的Dropbox文件夹中创建存储库的想法,这将使我能够使用笔记本电脑或台式机(或,实际上,任何其他可以访问Internet的计算机),然后将其提交回共享的Dropbox存储库。

I got a laptop in preparation for the coming semester, which will see me taking a university programming course while working full time. I will, of course, be using a source control system (probably Subversion) and had the idea of creating my repositories in my Dropbox folder, which would enable me to check out and work on code locally using my laptop or my desktop (or, indeed, any other computer that can access the Internet), and then commit it back to the shared Dropbox repository.


  • 任何陷阱或原因这不是实现我的目标的好方法吗? (假设我可以通过做一些愚蠢的事情来避免破坏SVN存储库。)

  • 使用网络托管解决方案的任何明显优势都将超过Dropbox的优势(即免费)。并已在我的机器上设置)?

  • 是否有其他共享策略来处理来自多个位置的代码?

注意::我不打算与其他人共享Dropbox文件夹,因为我意识到多个人通过 file:// 是个坏主意。我的问题仅涉及单个用户。

Note: I do not intend to share the Dropbox folder with others, as I realize that multiple people accessing a repository via file:// is a bad idea. My question only pertains to an individual user.

推荐答案

乍一看,这似乎是个坏主意(基本上是将两个不同的修订分层控制系统彼此之间具有不同的工作流),如果您是唯一的开发人员,那么有一种对您有意义的方法。

While at first glance this seems like a bad idea (basically layering two different revision control systems on top of each other with different workflows), there is a way that would make sense for you assuming you are the sole developer.

(请注意, Dropbox为您提供的内容是数据的脱机备份以及要与其同步的服务器。如果尝试单独使用SVN,则必须将计算机配置为允许远程访问。取决于您在sysadmin类型任务方面的专业知识水平。)

(As a side note, what Dropbox gives you is offline backup of your data as well as a server from which to sync with. If you attempt to use SVN on its own, you will have to configure your machine to allow access remotely. This may or may not be a deal-breaker for you depending upon your level of expertise in sysadmin type tasks.)

您可以做的是在Dropbox驱动器中为给定项目创建一个存储库。然后,在签出工作副本时,在Dropbox文件夹的外部中创建它,并使用 file:协议访问您的存储库。这样,存储库将在所有计算机之间保持同步,但是每台计算机都有一个单独的工作文件夹,从而可以根据需要在一个计算机上与另一个计算机上的不同分支上进行工作,或者维护未提交的代码而不会传播到另一台计算机上。发生这种情况的地方是,如果有多个人通过 file:协议访问该回购协议-由于可能的比赛条件,不建议这样做。

What you could do is create a repository for a given project in your Dropbox drive. Then when checking out a working copy, create it outside of the Dropbox folder, accessing your repo using the file: protocol. This way the repository stays synced across all machines, but each machine has a separate working folder, allowing you to work on a different branch on one machine than another if you wish, or maintaining uncommitted code without it getting propagated to another machine. Where this breaks down is if multiple people are accessing the repo via the file: protocol - this is not recommended due to possible race conditions.

注意::该解决方案使您即使在脱机时也可以继续提交,就像其他DVCS一样。但是请注意,执行此操作然后在允许回购同步之前在另一台计算机上脱机提交可能是灾难性的!在脱机工作后允许回购软件在另一台计算机上进行提交之前进行同步非常重要。

Note: this solution allows you to continue to commit even when offline, like other DVCS would. But note, doing this and then committing offline on another machine before allowing the repos to sync could be disastrous! It is extremely important to allow the repos to sync after working offline before doing a commit on another machine.

这篇关于流动学生如何才能将Dropbox与源代码控制系统一起有效使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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