How to Solve Error When Updating Oh My Zsh
This will hopefully help folks that use zsh and Oh My Zsh like myself.
After getting the prompt when opening iTerm2, or whatever terminal program you're using, you may see this:
[Oh My Zsh] Would you like to update? [Y/n]:
Which of course you type "Y", hit enter and hope it does its thing. But then, the error.
Updating Oh My Zsh error: cannot pull with rebase: You have unstaged changes. error: please commit or stash them. There was an error updating. Try again later?
So how do you deal with it? In my case, it happened to be because I made changes to the theme I was using, which is the agnoster theme. With Oh My Zsh kept under git, it was throwing the error until all changes to the folder were committed to git.
Here's the solution:
$ cd .oh-my-zsh/ (which will put you in the Oh My Zsh directory) $ git status (will show you what has not been staged and committed) $ git add . (this stages what you are about to commit) $ git commit -m "your preferred message/commit name" $ upgrade_oh_my_zsh
After that, your Oh My Zsh installation should upgrade just fine.