Fix [oh-my-zsh] Cant update: not a git repository


oh-my-zsh - Cant update- not a git repository
Last login: Wed Oct 26 11:12:41 on ttys001
[oh-my-zsh] Can't update: not a git repository.

If you are getting the above error, when you open Mac Terminal then somehow the location where you have installed Oh My ZSH is missing the .git directory and hence the error! when OMZ tries to look for updates from GitHub or some issues related to XCode installation.



Fix/Solution

Remove the files related to OMZ and do a fresh installation, remove the directory ~/.oh-my-zsh and reinstall.

% sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Found a thread on the ohmyzsh repo - might be helpful: https://github.com/ohmyzsh/ohmyzsh/issues/10861

-




Have Questions? Post them here!