xcode上传代码至GitHub

作者: 苏渝粤 | 来源:发表于2015-06-15 20:32 被阅读1502次

上传工程到GitHub有两种方式:

第一种:

1 首先在github上创建repository,复制对应的网址,下图红框所示

2新建工程,勾选options--Source Control -- Create Git repository on,将复制的地址粘贴到server address里面

3 添加好后在xcode菜单栏的Source Control里面选择Push即可

第二种:

已经创建了工程,但是没有选择create Git,这时候需要用终端处理

1 cd /Users/silverk/Documents/项目/bltForSwift

2 git init

3 git add .(有点)

4 git commit -m "swift bluetooth"(“”里面是释语,随便写)

5 完了重新打开工程,在xcode 菜单栏中,Source Control--Cheak out下分支中选择Configure,添加对应的网址

6 选择下方的push即可

参考网址:

http://www.cnblogs.com/mzds/p/3723817.html

相关文章

网友评论

  • 5b726ed578ce:第一种选项添加服务器地址不成功啊 提示““Failed to establish a connection to the server 'git@github.com。。。” 求指导
    苏渝粤:@小菜粥 我昨天重试遇到这个问题了;可以换个方法,在github上新建项目,然后xcode欢迎界面中点击check out项,新建项目保存至刚checkout的目录下,再commit就可以了

本文标题:xcode上传代码至GitHub

本文链接:https://www.haomeiwen.com/subject/wsqsqttx.html