Xcode复制我的存储库,并将其位置重命名为小写 [英] Xcode duplicates my repository and renames its location to lowercase

查看:68
本文介绍了Xcode复制我的存储库,并将其位置重命名为小写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个链接到我的项目的Git存储库.它位于/Users/a/Documents/Xcode Projects/MyProject之类的位置.我使用Xcode的UI提交更改,并且可以完美地运行几次.但是现在,突然之间,当我尝试提交新更改时出现了此错误:

I have a Git repository where my project is linked to. It is located somewhere like /Users/a/Documents/Xcode Projects/MyProject. I use Xcode's UI to commit changes and it worked perfectly for a couple of times. But now, out of a sudden, I get this error when trying to commit new changes:

无法找到工作副本myproject. 请验证工作副本是否可用,然后重试.

The working copy myproject could not be reached. Please verify that the working copy is reachable and try again.

如您所见,该消息以小写显示了我项目的名称,并且当我检查XCode中的存储库(文件-源代码管理-存储库...)时.我看到有两个看似相同的存储库(它们都链接到相同的 Origin ),但是有一个名称全部为小写的存储库.

As you can see, the message shows my project's name in lowercase and when I check the Repositories in XCode (File - Source Control - Repositories...). I see there are two, apparently identical, repositories (they both link to the same Origin), but one with the name all in lowercase.

正确的位置是/Users/a/Documents/Xcode Projects/MyProject,正如我告诉您的那样.但是复制的副本应该位于/Users/a/Documents/xcode projects/myproject中,该副本当然不存在.

The correct one location is /Users/a/Documents/Xcode Projects/MyProject as I told you. But the duplicated one is supposed to be located in /Users/a/Documents/xcode projects/myproject which, of course, does not exist.

有人知道为什么会这样吗?有人可以帮助我删除此重复的存储库并使我的项目链接正确吗?因此,我可以继续使用XCode的UI来提交代码更改.

Does anybody know why is this happening? Can anybody help me to delete this duplicated repository and make my project link the correct one? So I can keep using the XCode's UI to commit changes in my code.

推荐答案

从Xcode中打开项目时,我发现Xcode 4.2可以以两种不同的方式运行,具体取决于您在文件"->打开"对话框中选择的内容:

I found that Xcode 4.2 can behave in two different ways depending on what exactly you select in the File->Open dialog, when opening the project from within Xcode:

  1. .xcodeproj文件
  2. 项目文件夹(包含.xcodeproj文件)

选择1或2并按Enter将给我两个不同的存储库,它们在Xcode的存储库中具有不同的路径,因此有时它有助于关闭项目,删除两个存储库,然后以正确的方式"打开项目,例如1或2.

Selecting 1 or 2 and pressing enter wil give me two different repositories with different paths in Xcode's Repositories, so sometimes it helps to close the project, delete both repositories and then open the project in "the right way", say 1 or 2.

这篇关于Xcode复制我的存储库,并将其位置重命名为小写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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