oh-my-zsh偶尔提示not in a git repository等信息
问题
提示:not in a git repository
Would you like to update? [Y/n] Y
正常显示
原因是因为系统更新,git的内容被删除了
解决如下:
cd ~/.oh-my-zsh
git init # you've already done this step, so you can skip
git remote add origin https://github.com/robbyrussell/oh-my-zsh.git
git fetch
git reset --hard origin/master
//更新oh-my-zsh
upgrade_oh_my_zsh
出现命令行无法使用
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
解决
输入
xcode-select --install