macをupdateした後に出るgitのエラー「xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun」

macをCatalinaにupdateしたらgitコマンドで↓エラーが出るように。

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

ターミナルからコマンドラインツールをinstallでOK

xcode-select --install

devbash, git, mac

Posted by sakony