気軽に楽しくプログラムと遊ぶ

自分が興味があってためになるかもって思う情報を提供しています。

Mac OS XをYosemiteにアップデートしたらgitが動かなくなった場合の対処方法

以下のエラーが発生

git pull
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)

有効なXcode.appのパスが見当たらない。Xcode.appを探してみるが見当たらない。

  1. 再度、Xcodeのインストールを行う。 Mac App Store等でインストールする。 時間がかかるので、PCを使わない時にインストールしておくと幸せになれる。

2.Command Line Tools for Xcodeをインストール

xcode-select --install

無事に動作するようになった。

git pull
remote: Counting objects: 75, done.
remote: Compressing objects: 100% (65/65), done.
remote: Total 75 (delta 19), reused 2 (delta 2), pack-reused 8
Unpacking objects: 100% (75/75), done.