Xcode 认为远程 svn 存储库是 git

发布于 2024-12-05 19:37:53 字数 378 浏览 0 评论 0 原文

我在工作和家里运行 Xcode 4.1。我已经在我的家庭设置中成功地从远程 svn 存储库(工作)签出了一个项目。存储库已更新,因此当我回到家时,我对本地结账进行了更新。

更新文件的状态被标记为“U”(良好),并且出现一个页面,显示要接受的更改,但是当我点击“接受”时,我会收到一个弹出窗口,其中显示:

工作副本“ABRA-D”拉取失败。致命:不是 git 存储库 (或任何父目录):.git

嗯,是的...存储库是 svn,而不是 git!关闭 Xcode 并重新启动会删除“U”标签,我又回到了开始的地方。听起来 Xcode 对存储库类型感到困惑,尽管它知道足以查询 svn 存储库并找出已更新的内容。有谁知道有什么治疗方法吗?

I'm running Xcode 4.1 at work and home. I've successfully checked out a project from a remote svn repository (work) on my home setup. The repos was updated, so when I got home, I did an update on the local checkout.

The status of the updated files got flagged "U" (good) and a page appeared showing changes to accept, but when I hit accept, I get a popup that says:

The working copy "ABRA-D" failed to pull. fatal: Not a git repository
(or any of the parent directories): .git

Well, yes... the repo is svn, not git! Closing Xcode and restarting removes the "U" tags and I'm back where I started. Sounds like Xcode is confused about the repo type, though it knew enough to query the svn repo and find out what had been updated. Anyone know a cure?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

谁的年少不轻狂 2024-12-12 19:37:53

该问题已在“此处描述

最近我创建了一个新项目,在某个时候我将其上传到 SVN。我不太确定如何重现这种情况,但不知何故,Xcode 4 的版本控制支持决定将该项目解释为 git 存储库。

每次我尝试将文件拖放到项目中时,都会出现以下错误:

 fatal: Not a git repository (or any of the parent directories): .git

结果是文件被复制到项目文件夹中,但引用未在项目中设置。我必须进入文件夹并再次拖放文件,然后取消选中复制选项,以便设置引用。

解决方案

  1. 打开 Xcode 并转到 Window >组织者
  2. 在存储库下查找您的项目。如果您使用 SVN 之类的东西,它可能是两个条目。
  3. 确保显示“键入 Git”
  4. 标记存储库条目并按退格键或删除(在 Mac 上)
  5. 完成

That issue, already mentioned in "Error : Fatal: Not a git repository (or any of the parent directories): .git", has a somewhat curious solution described here:

Recently I created a new project and at some point I uploaded it to SVN. I am not quite sure how to reproduce this situation but somehow the versioning support of Xcode 4 decided to interpret the project as a git repository.

Each time I tried to copy a file per drag and drop into my project I got following error:

 fatal: Not a git repository (or any of the parent directories): .git

The result was that the file got copied into the project folder, but the reference didn't get set in the project. I had to go into the folder and drag and drop the file again and uncheck the copy option this time, so that the reference gets set.

The Solution

  1. Open Xcode and go to Window > Organizer
  2. Find under repositories your project. It might be two entries if you use something like SVN.
  3. Make sure it says "Type Git"
  4. Mark the repository entry and hit backspace or delete (on mac)
  5. Done
灼痛 2024-12-12 19:37:53

就我而言,当我创建项目时,它使用的是 git。但后来我从我的 SVN 存储库中删除了所有 git 文件。然后更新了。
现在,当我尝试添加文件时,它给了我同样的错误。

解决方案:我在 XCode Organizer 中删除了针对我的项目的所有存储库。现在,当我添加新文件时,它工作正常。

In my case, when i created my project it was using git. But later i removed all git files from my SVN repository. Then took an update.
Now, when i tried to add files, it gives me same error.

Solution: I removed all repositories against my project in XCode Organizer. Now when i added new files, it works fine.

染墨丶若流云 2024-12-12 19:37:53

我对同一个项目有一个 git 和 svn ,并尝试删除 git 并收到此错误

最后,手动编辑了在 处找到的 xcshareddata 并删除了与 git 存储库有关的所有条目。

myproject.xcodeproj/project.xcworkspace/xcshareddata

I had a git and svn against the same project and tried removing the git and got this error

In the end went and manually edited xcshareddata found at and removed all the entries which had anything to do with the git repositoy.

myproject.xcodeproj/project.xcworkspace/xcshareddata

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文