简体   繁体   English

使用dropbox时在xcode中使用本地git存储库是否有意义?

[英]does it make sense to use a local git repository in xcode while using dropbox?

I am the only programmer on this project and I would like to work on two different computers so I'm storing the project in dropbox. 我是这个项目中唯一的程序员,我想在两台不同的计算机上工作,所以我将项目存储在Dropbox中。 Should I check "Create local git repository"? 我应该检查“创建本地git存储库”吗? What are the impacts? 有什么影响?

在此输入图像描述

Creating the local git repository means you will be able to version-control your source code, which I would consider a good thing. 创建本地git存储库意味着您将能够对源代码进行版本控制,我认为这是一件好事。 Now, having a git repository in a DropBox is dangerous in case the DropBox folder is shared, if two people change stuff at the same time in that shared git repository, you will end up in a DropBox conflict nightmare. 现在,如果共享DropBox文件夹,在DropBox中拥有一个git存储库是危险的,如果两个人同时在该共享git存储库中更改了东西,那么最终会陷入DropBox冲突的噩梦。

Assuming your DropBox folder is only visible to you, and you will not work on both computers at the same time (seems unlikely), it is absolutely fine to have the local git repository in the DropBox, though it will increase the space consumed off your DropBox account (that's pretty much the only side-effect, that and bandwidth usage for synchronization). 假设您的DropBox文件夹只对您可见,并且您不会同时在两台计算机上工作(似乎不太可能),在DropBox中使用本地git存储库是绝对正常的,尽管它会增加您的消耗空间DropBox帐户(这几乎是唯一的副作用,即同步使用的带宽)。

It doesn't matter whether you check or not. 是否检查都没关系。
If you checked it, the XCode will create a local git repository at Dropbox fold for you. 如果您选中它,XCode将为您在Dropbox fold创建一个本地git存储库。 You can manage your project by your both two computer. 您可以通过两台计算机管理项目。
If not, you need to enter Dropbox fold and create a local git repository by yourself: 如果没有,您需要输入Dropbox fold并自己创建一个本地git存储库:

$ cd pathTo/Dropbox $ cd pathTo / Dropbox
$ git init $ git init

When you're the only person with access and only accessing it from one computer at a time, working directly off of this 'local repository' would work just fine. 如果您是唯一有权访问并且一次只能从一台计算机访问它的人,那么直接在此“本地存储库”之外工作就可以了。

When there is a situation where possibly more than one person would be able to access it at one time, be sure to follow git's most common practices. 当某种情况下可能有多个人同时访问它时,请务必遵循git最常见的做法。 use this 'centralized' storage location as a location that you can git clone when you're starting on a new computer and use git pull and git push to update changes to the repository. 使用此“集中式”存储位置作为在新计算机上启动时可以git clone的位置,并使用git pullgit push更新对存储库的更改。 This way everything can be synchronized between multiple 'separate' locations as well as dealing with conflicts when they come up. 这样,所有事情都可以在多个“分开”的位置之间同步,并在冲突出现时进行处理。

EDIT 编辑

Check out this other dropbox+git question to get some usage tips. 看看这个其他Dropbox + git问题,以获得一些使用技巧。 Lots of good info here. 这里有很多好消息。

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

相关问题 Xcode 4 中 Git 存储库的问题 - Problem with Git Repository in Xcode 4 在没有UITableViewController的情况下使用NSFetchedResultsController是否有意义? 它们有什么关系? - Does it make sense to use a NSFetchedResultsController without an UITableViewController? How are they related? Git本地存储库管理 - Git local repository management 即使更改“模型视图”矩阵,使用“顶点缓冲区对象”是否有意义? - Does it make sense to use Vertex Buffer Objects even when changing the Model View matrix? xcode4:如何使用“ git存储库”与不同计算机上的多个用户共享同一项目? - xcode4 : How to use “git repository” to share same project with multiple users on different computer? 拥有多个NSPersistentStoreCoordinators是否有意义? - Does it make sense to have multiple NSPersistentStoreCoordinators? 在iPhone上进行多线程是否有意义? - Does it make sense to do multithreading on the iPhone? 游戏中心:addRecipientsWithPlayerIDs ......它有什么意义? - Game Center: addRecipientsWithPlayerIDs… How does it make sense? 在使用UIWebView时将Javascript包含在Xcode 4中作为本地资源 - Including Javascript as a local resource in Xcode 4 while using a UIWebView 使用XCode 4.2,是否可以使用Storyboard制作兼容iOS 4的应用程序? - Using XCode 4.2, Is it possible to use Storyboards to make an iOS 4 compatible app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM