如何将 Xcode 与 GitHub 集成?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2718060/
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 integrate Xcode with GitHub?
提问by Roman Kagan
How would it be possible to integrate Xcode with GitHub?
如何将 Xcode 与 GitHub 集成?
回答by Chuck Vose
回答by Joshua Saayman
A lot has happened in the world of Xcode & Git/GitHub since the original question and answers.
自从最初的问答以来,Xcode 和 Git/GitHub 的世界发生了很多事情。
See this articlere setting up a GitHub remote repository in Xcode.
请参阅本文重新在 Xcode 中设置 GitHub 远程存储库。
回答by codercat
think I found the Xcode way to push a existing project to GitHub or any other remote repository!
想我找到了将现有项目推送到 GitHub 或任何其他远程存储库的 Xcode 方式!
Preconditions
先决条件
I assume that you have a project created by Xcode 4 with a local git repository. You created an empty remote git repository (I call it RemoteRepository in in the following example)
我假设您有一个由 Xcode 4 创建的带有本地 git 存储库的项目。您创建了一个空的远程 git 存储库(我在以下示例中将其称为 RemoteRepository)
Push it to remote
推送到远程
- Open the Organizer in Xcode an go to the Repositories tab
- At first click on Remotes and then on "Add Remote"
- 在 Xcode 中打开 Organizer 并转到 Repositories 选项卡
- 首先点击遥控器,然后点击“添加遥控器”
- Enter a Remote Name and the Location of your remote repository and click on create
- 输入远程名称和远程存储库的位置,然后单击创建
- Then select your project and open File -> Source Control -> Push ...
- 然后选择您的项目并打开 File -> Source Control -> Push ...
- Select your remote repository and wait until it is connectable! Look for the Create in the brackets.
- 选择您的远程存储库并等待它可连接!在括号中查找 Create。
- Now your old project is published to GitHub
- 现在您的旧项目已发布到 GitHub
回答by Tom Cabanski
People I know use the git-osx-installerto get the tools. This includes a tool that lets you open the Git GUI from the current folder in the finder.
我认识的人使用git-osx-installer来获取工具。这包括一个工具,可让您从查找器中的当前文件夹打开 Git GUI。
I am no aware of a plug-in for Xcode. Hereare some guidelines for setting up your Git to work better with Xcode projects.
我不知道 Xcode 的插件。 以下是设置 Git 以更好地与 Xcode 项目配合使用的一些指南。