使用存储库时Xcode崩溃 [英] Xcode crashes when working with repository

查看:70
本文介绍了使用存储库时Xcode崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Xcode项目,一个本地和一个远程存储库.首先,当前版本存在问题,我决定使用终端更改本地存储库的目录. Xcode获取了所有内容,我继续从事该项目.当我决定提交更改时,Xcode给了我这样的错误:错误:src refspec(与分离)不匹配any.error:无法将某些引用推送到[存储库地址]".之后,我决定创建一个新的远程存储库,并尝试对该项目进行首次提交.我向Xcode添加了remote,现在即使我打开"remotes"选项卡,它也会崩溃.我将bitbucket用作远程回购.
问题:可以解决此问题,还是将项目的所有内容复制到另一内容并提交新内容更容易?感谢您的答复.

I have an Xcode project one local and one remote repository. Firstly, there was a problem in current version and I decided to change local repository's head using terminal. Xcode fetched everything and I continued working on the project. When I decided to commit changes, Xcode gave me an error like this: "error: src refspec (detached from ) does not match any.error: failed to push some refs to [repository address]". After, I decided to create a new remote repository and try to make initial commit of this project. I added remote to Xcode and now it crashes even if I open "remotes" tab. I use bitbucket as my remote repo.
Question: is it possible to fix this, or it is easier to copy all the contents of the project to another one and commit new one? Thanks for replies.

推荐答案

已解决:
创建一个新的空项目,然后复制上一个项目中的所有文件.创建新的存储库,绝对干净.推到那里.
当使用命令行和git更改本地存储库的头部时,似乎Xcode发生了冲突.因此,这是对情况相同的用户的警告.

Solved:
Create new empty project, then copy all the files from previous one. Create new repository, absolutely clean. Push there.
It seems that Xcode had a conflict when local repository's head was changed using command line and git. So, this is as warning for users who got the same situation.

这篇关于使用存储库时Xcode崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆