Mac 初期化直後に Git コマンドが使えない時は

Mac の初期化状態だと、ターミナルで git コマンドが使えず、以下のようなエラーが出る。

$ git
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

XCode Command Line Tools がないのが原因らしい。$ xcode-select --install すると直った。