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

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap