第一步:先注册GitHub账号
注册地址:GitHub官网注册入口
第二步:在GitHub上创建空的仓库(New Repositories)

看到上面的界面,点击箭头所指的 +,选择 new repositories,会看到如下图所示:

第三步:新仓库简介
至此,一个空的仓库就创建完成了,如下图
第四步:连接远程仓库,在这里选择使用Xcode来完成该操作
把MAC 上面的XCode打开,打开之后,左上角菜单选择Xcode->Preference选项,如下图所示


第五步:将远程空仓库克隆到本地
选择Xcode ->source control->Clone,如下图

克隆到本地之后是一个空的项目
第六步:创建新项目,选择保存目录为刚才clone的文件夹

第七步:把新添加的文件推送到远程服务器
选择Xcode ->source control ->commit,如下图

点击Commit file
第八步:点击Xcode ->source control ->Push,将本地项目推送至服务器
第九步:前往刚才创建的空仓库查看,不出意外会看到刚才上传的项目文件
祝好运!
网友评论