Cocoapods错误:"因为你有未合并的文件,所以无法拉动."

Sil*_*Not 34 macos ios cocoapods

安装新的CocoaPod时,出现以下错误.

$ pod install
Analyzing dependencies
[!] Pod::Executable pull

A   AFHARchiver/0.2.1/AFHARchiver.podspec

A   AFWunderlist/1.0/AFWunderlist.podspec

A   AFWunderlist/1.1/AFWunderlist.podspec

A   AFgzipRequestSerializer/0.0.1/AFgzipRequestSerializer.podspec
Run Code Online (Sandbox Code Playgroud)

...

A   wpxmlrpc/0.4/wpxmlrpc.podspec

A   zipzap/6.0/zipzap.podspec
Pull is not possible because you have unmerged files.

Please, fix them up in the work tree, and then use `'git add/rm <file>'`

as appropriate to mark resolution, or use `'git commit -a'`.
Run Code Online (Sandbox Code Playgroud)

以为我会分享下面的修复.

Sil*_*Not 71

问题是specs存储库,不在我身边.

在这里找到答案podfile在安装时给出了错误,但由于问题在症状上不那么明确,我想我会再次交叉引用它以防有人以不同的方式查找它.

答案在http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/上的博客文章中解释了问题以及下面重复的修复:

"您将不得不手动删除Specs存储库的任何本地副本,并重新克隆新版本的Specs存储库.您可以使用以下命令执行此操作:

  $ pod repo remove master
  $ pod setup
Run Code Online (Sandbox Code Playgroud)

如果您对Specs存储库进行了任何未合并的本地提交或更改,则应确保拥有它们的副本.我建议您手动复制这些更改并重新提交它们.您可以修复您的存储库而不删除,但是,这不是一个简单的过程,因此我们建议您删除Specs存储库的副本及其任何分支."


Sha*_*ssy 15

rm -rf ~/.cocoapods 也有效