如何在 Xcode 中设置 SCM?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3852986/
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 set up an SCM in Xcode?
提问by openfrog
I know Xcode can be hooked up to an SCM. But how would I set this up from scratch? How to check out / commit files into that, after setting it up?
我知道 Xcode 可以连接到 SCM。但是我如何从头开始设置呢?设置后如何检出/提交文件?
采纳答案by Sagar
A great guide for setting up subversion repository & configuring with XCode - http://iphonedevelopment.blogspot.com/2009/03/version-control-is-your-friend.html
使用 XCode 设置 Subversion 存储库和配置的绝佳指南 - http://iphonedevelopment.blogspot.com/2009/03/version-control-is-your-friend.html
Other useful resources -
其他有用的资源 -
1) http://developer.apple.com/tools/subversionxcode.html
1) http://developer.apple.com/tools/subversionxcode.html
2) Which SCM system for Xcode?
3) http://www.covertapps.com/development/6-setting-up-your-xcode-scm-repositories
3) http://www.covertapps.com/development/6-setting-up-your-xcode-scm-repositories
Thanks,
谢谢,
Sagar
萨加尔
回答by John Franklin
Once it is set up, several new menu items appear in the SCM menu. You can right-click over specific filenames and perform some SCM operations that way.
设置完成后,SCM 菜单中会出现几个新的菜单项。您可以右键单击特定文件名并以这种方式执行一些 SCM 操作。
You can also right-click over "Groups & Files" and enable "SCM" there, which will show which files are new or modified.
您还可以右键单击“组和文件”并在那里启用“SCM”,这将显示哪些文件是新的或已修改的。
I never used Xcode's SCM features for anything more than to see what files I've modified, a feature that only helped me find the code I was currently fixing. For all the updates & commits, I would use the command line, but that's a personal preference. I'm a long-time command-line CVS and SVN user. It is faster for me on the command line.
我从来没有使用 Xcode 的 SCM 功能来查看我修改了哪些文件,这个功能只能帮助我找到我当前正在修复的代码。对于所有更新和提交,我会使用命令行,但这是个人偏好。我是一个长期的命令行 CVS 和 SVN 用户。在命令行上对我来说更快。
回答by Adam Eberbach
I highly recommend starting with git- while I once preferred perforce I don't like paying for it and lack of Xcode integration makes it tedious. Git is supported in Xcode 4. Using it without integration for a month or two would be invaluable as you will then understand more of what is going on... SCM, like data backups, is only any good when you understand it and use it right.
我强烈建议从git开始——虽然我曾经更喜欢 perforce,但我不喜欢为此付费,缺乏 Xcode 集成使它变得乏味。Xcode 4 支持 Git。在没有集成的情况下使用它一两个月将是非常宝贵的,因为您将了解更多正在发生的事情...... SCM,就像数据备份一样,只有在您理解并使用它时才有用对。
I like git because it can be used as a local SCM with replication/sync with a central repository. It is widely used and actively maintained. It is free & open source, and I have used it as part of a team delivering a very complex and successful iPhone app.
我喜欢 git,因为它可以用作本地 SCM,与中央存储库进行复制/同步。它被广泛使用并积极维护。它是免费和开源的,我作为团队的一员使用它,提供了一个非常复杂和成功的 iPhone 应用程序。
I really like Git Tower as a GUI.
我真的很喜欢 Git Tower 作为 GUI。