一、报错内容:
/Users/user/.rvm/gems/ruby-2.4.1@global/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:129:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
from /Users/user/.rvm/gems/ruby-2.4.1@global/gems/cocoapods-1.5.0/lib/cocoapods/command.rb:49:in `run'
from /Users/user/.rvm/gems/ruby-2.4.1@global/gems/cocoapods-1.5.0/bin/pod:55:in `'
from /Users/user/.rvm/rubies/ruby-2.4.1/bin/pod:23:in `load'
from /Users/user/.rvm/rubies/ruby-2.4.1/bin/pod:23:in `'
from /Users/user/.rvm/gems/ruby-2.4.1@global/bin/ruby_executable_hooks:15:in `eval'
from /Users/user/.rvm/gems/ruby-2.4.1@global/bin/ruby_executable_hooks:15:in `'二、错误现象描述:我的问题是由于头天晚上把xcode升级到最新版本,第二天上午使用cocopods便报此类错误(网上还介绍了很多其他原因,我暂时尚未遇到)三、解决办法:sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer上面的命令直接拷贝到terminal终端运行即可注意:在使用之前一定要看清路径与你电脑上的xcode路径是否一致,若不一致请保存好数据再尝试,不要造成一些无法挽回的损失