Pod file not being initialized?

Usama bin Attique picture Usama bin Attique · Feb 2, 2017 · Viewed 12.1k times · Source

When i try to initialize pod file to use cocoapods via terminal, it gives me this error. How to fix it.

/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:128:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)

Answer

Guohua Cheng picture Guohua Cheng · Feb 18, 2017

I encounter the same problem and solve it by using the following command:

sudo xcode-select --switch /Applications/Xcode.app 

As the error message in terminal shows, something with my git goes wrong. And, it has to do with the command line tool.