ohmyzsh: unable to upgrade
[Oh My Zsh] Would you like to check for updates?
Type Y to update oh-my-zsh: Y
Upgrading Oh My Zsh
Cannot pull with rebase: You have unstaged changes.
Please commit or stash them.
There was an error updating. Try again later?
About this issue
- Original URL
- State: closed
- Created 11 years ago
- Reactions: 43
- Comments: 50 (2 by maintainers)
Same problem… One liner fix.
Try
and then run the upgrade and then
after that to get your changes back.
Navigate into your .oh-my-zsh directory and do a ‘git status’ to see if there are any changes you made to existing files. If there are, I think you’ll have to revert those changes before you can update.
I already fixed this, try delete the option “—rebase” in tools/upgrade.sh
Improved one-line solution:
if any of the above does not work for you try this
It is happening most likely because you have edited something in your .oh-my-zsh directory but you have not committed it.
You should be able to upgrade now.
Optional: After step 2, you may be able to just run "git commit -a -m <insert your comment> " which should stage all the unstaged files and commit those changes (combining step 3 and 4).
This worked for me and I hope it works for someone else too. No quotes or <> in those commands ( just in case (: )
And don’t forget to
git stash popafter you upgrade to re-apply your changes (if desired).$ sudo git reset --hardfixed this for me.Caused by mackup operation.
If you confirm to ignore all changes mackup made.
cd "$ZSH" && git reset --hard origin/HEAD && upgrade_oh_my_zshshould resolve this issue.Don’t forget pop or you’ll loose the changes to your themes.
cd "$ZSH" && git stash && upgrade_oh_my_zsh && git stash pop@ODelibalta is right if you concern your changes…
1. Navigate to the
.oh-my-zsh/directory. 2. Rungit status. It should display a list of files changed. 3. Stage those files withgit add [filename(s)]4. Commit those changes withgit commit -mand then upgrade zsh via
upgrade_oh_my_zshcommand. enjoy!..Have tried
cd "$ZSH" && git stash && upgrade_oh_my_zsh, but it didn’t work for me. After that I tried follow the error to userm -fr ".git/rebase-merge"and thenupgrade_oh_my_zsh, resolved my issues.Thanks is worked @RussellBradley
It just an opinion, but it would help if after the error message is added a new line with a text like “(Oh My Zsh git repo): ~/.oh-my-zsh” so people like me and most people that like this project but are not maintainers nor *Zsh experts don’t have to google it.
Had similar experience with
oh_my_zsh. Did not realize that the installation and upgrade are tied to the repo. Because I changed the CLI prompt inthemes/agnoster.zsh-theme, it is identified as untracked changes and cause upgrade pull to fail. For now, the following steps works for me:For those who are getting here when using babun on Windows, I recommend using @kayoub5’s method for fixing this (copied below):
Then just let it run the next update.
Thanks @RussellBradley.
Thanks russelBradley !
Thanks @RussellBradley
Thanks russelBradley !
Thanks @RussellBradley 👍
Thanks russelBradley 👍
Thanks @RussellBradley - that works!
Thanks russelBradley 👍
The one liner solved my issue. Thank you RussellBradley!
Thanks russelBradley 👍
I got it. I just solve some conflicts and the git rebase --continue.
👍 I’m experiencing this as well…