【发布时间】:2018-08-27 14:50:46
【问题描述】:
我创建了一个新的 Xcode 项目,并选择了以下选项:
经过一些编码后,我进入源代码控制菜单并选择了提交。 提交文件后,我的主分支也不可见
我需要添加一个远程仓库并将这个 xcode 项目推送到 github 仓库。
我已经尝试了所有这些解决方案:
All answers from this stackoverflow link too
可能是什么问题?我第一次使用 git 版本控制,所以无法弄清楚缺少什么。
编辑 使用@VonC 解决方案:
使用命令行推送时出现此错误:
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/xia.....'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
编辑 2:
这是我在 github 页面上的分支:
【问题讨论】: