在 XCode 3/4 中使用 GIT 或 SVN,无需服务器
好吧,也许我正在尝试完成一些无法完成的事情。
我是一名单一开发人员(不属于团队)。
我正在尝试让某种版本控制系统运行起来。我曾在 XCode 3 中使用 CVS,但 XCode 4 不再提供此选项。我听说 SVN 和 Git 是更好的选择。
基本上,我已经浪费了半天多的时间试图让 XCode 与 SVN / Git 一起工作。我没有运行服务器,并且不想在服务器上公开我的项目。
对于我来说,拥有一个单独的用户来运行 Git/SVN 服务器也是没有意义的。
我只是想以最简单的方式使用其中之一进行版本控制。
我尝试使用本地文件路径(/Volumes/AAA/BBB/Repo)添加 Repo,我在其中手动创建了“Repo”目录。我已将类型设置为 Subversion(并且还尝试了 Git)。 XCode 说“主机可访问”。但是,提交功能不存在(已禁用)。我无法导入我的工作目录。
我只是不明白 - 我必须有一个服务器运行才能有 SVN/Git,还是 XCode 可以通过命令行来完成?我更喜欢通过命令行完成它,因为服务器完全是多余的。或者,我错过了什么吗?也许我在 XCode 中放入了错误的设置?
这不是严格意义上的 XCode 4 问题,我在 XCode3 中也遇到了同样的问题,但至少它有 CVS 选项 - 现在它已经消失了。
Ok, perhaps I'm trying to accomplish something not doable.
I am a single developer (not part of team).
I'm trying to get some kind of versioning system going. I had used CVS with XCode 3, but XCode 4 no longer has that as an option. I've heard that SVN and Git are better alternatives anyway.
Basically, I've wasted more than half a day trying to get XCode to work with SVN / Git out of the box. I do not have a server running, and would rather not expose my project on a server.
It doesn't make sense for me to have a separate user just to run the Git/SVN Servers, either.
I'm just trying to have version control using either one, in the simplest possible way.
I've tried to add Repo, using local file path (/Volumes/AAA/BBB/Repo) where I manually created the "Repo" directory. I've set the type as Subversion (and also tried Git). XCode says "Host is reachable". But, the Commit functionality is not there (Disabled). I can't import my working directory.
I just don't get it - must I have a server running in order to have SVN/Git, or can XCode just do it through command line? I much more prefer it being done over command line, since the server is complete overkill. Or, am I missing something? Maybe I'm putting in the wrong settings into XCode?
This isn't strictly an XCode 4 issue, I had the same issue with XCode3, but at least it had the CVS option - now it's gone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用 Git,您不需要中央服务器,甚至不需要中央存储库,除非项目中有多人。 SVN 要求您有一个中央存储库和存储库。服务器一直在运行,但是使用 Git,您可以简单地
git init
一个新的存储库并开始使用它。如果您没有中央存储库,您将永远不会使用push
、pull
或fetch
。With Git you don't need a central server or even a central repository unless you have multiple people on the project. SVN requires you to have a central repo & server running all the time, but with Git you can simply
git init
a new repo and start using it. If you don't have a central repo you will never usepush
,pull
, orfetch
.Xcode 的帮助提到了以下内容:
所以官方的建议是,对于你的情况,Git 是最简单的解决方案。我现在的处境与您所描述的相同,并将按照建议尝试 Git。
之前在一家小公司工作时,我们使用了一台专用的剩余MacMini作为SVN服务器;这很容易设置,并且多年来一直发挥着作用。请注意,Xcode 3 的 SVN 集成比 Xcode 4 更好,因此我最终使用 Xcode 4 进行开发和基本 SVN 使用,同时使用 Xcode 3 进行 Xcode 4 不再做的 SVN 功能。
Xcode's help mentions the following:
So the official advise is that in your case, Git is the easiest solution. I'm now in the same position as you described and will be trying Git as advised.
Previously, when working for a small company, we used a dedicated leftover MacMini as an SVN server; this was quite easy to set up, and worked like a charm for many years. Be aware that the SVN integration of Xcode 3 was better than that of Xcode 4 though, so that I ended up using Xcode 4 for development and basic SVN usage, together with Xcode 3 for SVN stuff that Xcode 4 wouldn't do anymore.