一、報錯內容:
/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路徑是否一致,若不一致請保存好數據再嘗試,不要造成一些無法挽回的損失