我和我的朋友正在尝试开发一个 iPhone 项目,但在使用 GitHub 进行版本冲突管理时遇到了问题。
例如:我们都在使用 xCode 4.2(和 GitHub Mac 客户端)处理某行代码。
int majorVersion = 0;
1) 他将代码更改为 int majorVersion = 999;
,并提交更改;同步-没有问题,最终在GitHub上保存。
2) 同时,我将代码更改为 int majorVersion = 666;
然后:
- 我提交更改
- 发生冲突-我通过选择代码行(
int majorVersion = 666;
)来选择我的某个版本 - 在xCode中,我删除有趣的 <<<<<int majorVersion = 666;)
- 提交更改
- 最终:我尝试发布分支,但遇到以下错误:
error: unable to push to unqualified destination: HEAD The destination refspec neither matches an existing ref on the remote nor begins with refs/, and we are unable to guess a prefix based on the source ref. error: failed to push some refs to 'https://github.com/XXX/XXX.git'
我们做错了什么?主要问题是我是否已经在xCode中删除了有趣的 <<<<<
git
程序。git status
显示了什么?在尝试推送之前,您是否提交了合并冲突的解决方案? - Daenyth