Cocoapods complaining about unmerged files due to broken specs repository

If you see the following message at the end of any pod command output:
Pull is not possible because you have unmerged files.

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

as appropriate to mark resolution, or use 'git commit -a'.
Then you need to
$ pod repo remove master
$ pod setup
As described on http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/.