如何在 XCode 中设置 SVN 存储库?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10766314/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to setup SVN repository in XCode?
提问by The Crazy Chimp
I have got to the point with developing iPhone apps that I need a way of managing versions. I have looked into the ways to do this through Xcode
and I see that I can either go down the path of using GIT
or SVN
.
我已经到了开发 iPhone 应用程序的重点,我需要一种管理版本的方法。我已经研究了如何做到这一点Xcode
,我发现我可以沿着使用GIT
或的路径走下去SVN
。
In the past I have used SVN
which is the reason I'm more inclined to go down this path (I'm open to using GIT
if people feel it is better than SVN
). My question is related to the setup of a repository in Xcode
.
过去我使用过SVN
,这就是我更倾向于走这条路的原因(GIT
如果人们觉得它比 更好,我愿意使用SVN
)。我的问题与在Xcode
.
I have done a fair amount of research and I have found several useful tutorials, however a lot of the seem to be outdated.
我做了大量的研究,我发现了几个有用的教程,但是很多似乎已经过时了。
My question is 2-fold:
我的问题有两个:
- Please can someone advise on the steps to setup a repository through
Xcode
? - I notice
Xcode
requires me to set the location of the repository. I'm not sure what to do here, since I don't have my own server. Is there a way I can get around this? Can I setup a local repository somehow (if so how? if not what are my other options?)?
- 请有人建议设置存储库的步骤
Xcode
吗? - 我注意到
Xcode
要求我设置存储库的位置。我不知道在这里做什么,因为我没有自己的服务器。有没有办法解决这个问题?我可以以某种方式设置本地存储库吗(如果可以,如何设置?如果不是,我的其他选择是什么?)?
Thanks in advance for any help or advice people can offer.
预先感谢人们可以提供的任何帮助或建议。
采纳答案by Darshan Prajapati
I think you should go with using GIT. You can create free repository on bitbucket.org
我认为您应该使用 GIT。您可以在bitbucket.org上创建免费存储库
It allows you to create free account which can be used using 5 members of your team. If you want more you need to pay.
它允许您创建免费帐户,可以使用您团队的 5 名成员。如果你想要更多,你需要付费。
Once you are done with creating repo. just check it out on your pc. There are steps given on that site how to do that. Then in the folder which you checked out, create your XCode project. Once your project is ready, add it to the repository. How to do that is also given on bitbucket. Then once you have committed your Xcode project to repository, add that repository to XCode. How to do that is very nicely explained in XCode guide. Just read that.
完成创建 repo 后。只需在您的电脑上查看即可。该站点上给出了如何执行此操作的步骤。然后在您签出的文件夹中,创建您的 XCode 项目。项目准备好后,将其添加到存储库。bitbucket 上也给出了如何做到这一点。然后,将 Xcode 项目提交到存储库后,将该存储库添加到 XCode。如何做到这一点在 XCode 指南中有很好的解释。就读那个。
回答by Evan Mulawski
If you have a home server (or company server), I would use uberSVN. The guided installation is extremely simple. I actually use this to keep all of my Xcode projects under version control.
如果您有家庭服务器(或公司服务器),我会使用uberSVN。引导式安装极其简单。我实际上使用它来保持我所有的 Xcode 项目处于版本控制之下。
Steps:
脚步:
- Install an SVN client. (Bottom-right of the page. You can choose 1.6 or 1.7, and your OS via the tabs on the top of the page).
- Install uberSVN.
回答by Nas Banov
It's actually very easy to setup a local SVN repository on your Mac and reap the benefits of version control without remote/networked repository.
在 Mac 上设置本地 SVN 存储库实际上非常容易,并且无需远程/网络存储库即可获得版本控制的好处。
See e.g. explanation here https://stackoverflow.com/a/10039004/226086Then the path you give Xcode is wherever you set up the repository, say file:///Users/Shared/subversion/ - under Preferences/Accounts/Add Repository, when it asks "Enter repository address".
参见这里的解释https://stackoverflow.com/a/10039004/226086然后你给 Xcode 的路径是你设置存储库的地方,比如 file:///Users/Shared/subversion/ - 在 Preferences/Accounts/Add 下存储库,当它询问“输入存储库地址”时。
回答by Michael Dautermann
Setting up one's own Subversion or Git server is something developers shouldn't have to fight with, it can be a pain (in terms of sys administration).
设置自己的 Subversion 或 Git 服务器是开发人员不应该与之抗争的事情,这可能会很痛苦(就系统管理而言)。
If it were me, I'd consider using GitHub if you want to share code publicly (free!) or if you want to share code privately among several of your own computers.
如果是我,如果您想公开共享代码(免费!)或者您想在自己的多台计算机之间私下共享代码,我会考虑使用 GitHub。
If you're sharing among your own computers, a "micro" account on GitHub runs $7 per month. This is the option I do for my own private & personal projects. So nice to have support built into Xcode.
如果您在自己的计算机之间共享,GitHub 上的“微型”帐户每月收费 7 美元。这是我为自己的私人和个人项目所做的选择。非常高兴能够在 Xcode 中内置支持。
There are also other third party providers that do both Subversion and Git, such as WebFaction, but this would also cost dollars as well. All of these services have to recoup the costs of doing your system administration. But I think having somebody else do it for you is well worth not having to deal with the hassle.
还有其他第三方提供商同时提供 Subversion 和 Git,例如 WebFaction,但这也会花费美元。所有这些服务都必须收回进行系统管理的成本。但我认为让其他人为你做这件事是值得的,不必处理这些麻烦。
回答by DrummerB
SVN requires you to use a server to host your repository on. If you're working on an open source project there are webservices that will allow you to host your repository for free (Google Code for instance). Although it's possible to have the server on the local machine, it's better to use GIT in that case. When you create a new project XCode will propose to setup a GIT repository for you, or see thison how to create a new repository for your existing project.
SVN 要求您使用服务器来托管您的存储库。如果您正在从事开源项目,则可以使用网络服务免费托管您的存储库(例如 Google 代码)。尽管可以在本地计算机上安装服务器,但在这种情况下最好使用 GIT。当你创建一个新项目的XCode将提议建立一个Git仓库给你,或者看到这个关于如何创建一个新的信息库用于现有项目。