After upgrading Android Studio to Bumblebee version, I encountered this error.
Xcode has been installed, but currently is uninstalled.
xcode-select --install
sudo xcode-select --reset
, this will reset its path/Library/Developer/CommandLineTools/usr/bin/git