今天重启了一下mac,结果git不能用了,报错:

经查阅:可能是xcode更新没了,重新安装一下。

安装命令:

xcode-select --install

安装结果:

点击安装

安装完成后,git恢复可用。