安装git后遇到的问题及解决

今天开始使用gitlab,参照http://rogerdudler.github.io/git-guide/index.zh.html

下载完OS X下的gitlab,双击图形化安装文件很轻松完成安装,之后打开终端输入which git显示git命令所在的bin目录,再输入git --version显示了一个错误: 

xcrun: error: active developer path ("/Volumes/Xcode/Xcode.app/Contents/Developer") does not exist, use xcode-select to change

使用这个命令: sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer 解决上面的问题,再输入git --version后显示如下:

git --version

git version 1.8.3.4 (Apple Git-47)

完成安装。

 

 

原文地址:https://www.cnblogs.com/ranger-cc/p/3516998.html