首页 > 解决方案 > 存储在 iCloud 中的 Xcode 中 iOS 应用程序的重复且未提交的 Firebase 头文件

问题描述

TLDR:每个人在将 Xcode 应用程序存储在 iCloud 和 GitHub 上的体验如何?

我有 2 台 Mac(15 英寸 MacBook Pro 2016 和 M1 Mac Mini),我的 Swift 代码存储在我的 GitHub 和 iCloud 中,因为我希望我在 MB Pro 上的更改也出现在我的 M1 Mac Mini 上。我也不同时打开两个 Mac 的 Xcode 应用程序以使其在 iCloud 上更轻松。一切正常,因为 M1 Mini 是通过我的 MacBook Pro 的 TimeMachine 备份启动的,直到我不得不重新格式化我的 Mac Mini,因为它认为它是 MacBook专业版,因此​​某些应用程序无法正常工作。

除了 Notability,我可以通过重新下载来修复大多数应用程序问题,但是,我的 Mac Mini 仍然会要求我通过指纹登录进行身份验证。由于我的大部分笔记都记录在 Notability 上,而且由于大学课程的目的,我无法再使用 Notability。所以我重新格式化了我的 M1 Mini 并完成了整个环境设置。

现在问题/问题 我打开了 Xcode 之一,我正在从 iCloud Drive 在我的 Mac Mini 上工作,令人惊讶的代码仍然在运行。但是,我在未暂存的文件中看到这 6 个 Firebase 头文件,而在我的 MacBook Pro 上没有未暂存的文件。有谁知道发生了什么?我应该忽略它吗?

我试过 git force 重置我的本地分支

git fetch --all
git reset --hard origin/samuel/feature1

但我收到以下错误。

error: unable to read sha1 file of Multiverse/Pods/Headers/Private/Firebase/Firebase.h (07ac6eb193d61bc7bf93a47fda7e949fc6d12cd7)
error: unable to read sha1 file of Multiverse/Pods/Headers/Private/FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsData.h (ce646ecf1d2e4f0e748e81842f81604064ae3f5c)
error: unable to read sha1 file of Multiverse/Pods/Headers/Private/FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsInterop.h (07d83d70f41da4aaa329489cc8528ac5709ee382)
error: unable to read sha1 file of Multiverse/Pods/Headers/Public/Firebase/Firebase.h (07ac6eb193d61bc7bf93a47fda7e949fc6d12cd7)
error: unable to read sha1 file of Multiverse/Pods/Headers/Public/FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsData.h (ce646ecf1d2e4f0e748e81842f81604064ae3f5c)
error: unable to read sha1 file of Multiverse/Pods/Headers/Public/FirebaseCoreDiagnosticsInterop/FIRCoreDiagnosticsInterop.h (07d83d70f41da4aaa329489cc8528ac5709ee382)
fatal: Could not reset index file to revision 'origin/samuel/feature1'.

标签: swiftxcodegithubicloudicloud-drive

解决方案


该问题已通过以下命令解决,

git config core.symlinks false

查看更多请点击此链接:错误:无法创建符号链接,致命:无法将索引文件重置为修订版“HEAD”


推荐阅读