Cocoapods error: “Pull is not possible because you have unmerged files.”

◇◆丶佛笑我妖孽 提交于 2019-12-20 10:18:55

问题


When installing a new CocoaPod, I got the following error.

$ 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

. . .

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'`.

Thought I would share the fix below.


回答1:


Problem was with specs repository, not on my side.

Found the answer here podfile gives an error on install, but since the question was less explicit on the symptom, I thought I would cross-reference it again in case someone was looking it up differently.

The answer is in the blog post here http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/ which explains the issue and the fix which is repeated below:

"You are going to have to manually delete any local copies of the Specs repository and re-clone the new version of the Specs repository. You can do that with the following commands:

  $ pod repo remove master
  $ pod setup

If you have any local commits or changes to the Specs repository which are not merged, you should ensure you have a copy of them. I would recommend that you manually copy these changes over and re-commit them. You can fix your repository without deleting, however, this is not a simple process, so we are instead recommending that you delete your copy of the Specs repository and any forks of it."




回答2:


rm -rf ~/.cocoapods also works



来源:https://stackoverflow.com/questions/21534309/cocoapods-error-pull-is-not-possible-because-you-have-unmerged-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!