Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to upgrade #1984

Closed
brewster1134 opened this issue Jul 19, 2013 · 44 comments

Comments

@brewster1134
Copy link

commented Jul 19, 2013

Go to solution

[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?
@codeblooded

This comment has been minimized.

Copy link

commented Jul 25, 2013

👍 I'm experiencing this as well…

@sincospi

This comment has been minimized.

Copy link

commented Jul 30, 2013

Same here

@therealechan

This comment has been minimized.

Copy link

commented Aug 10, 2013

I got the same problem. How can I fix this ?

@greenchapter

This comment has been minimized.

Copy link

commented Aug 11, 2013

I have the same Problem, what can i do?

@tanookiben

This comment has been minimized.

Copy link

commented Aug 13, 2013

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.

@therealechan

This comment has been minimized.

Copy link

commented Aug 14, 2013

I already fixed this, try delete the option “—rebase” in tools/upgrade.sh

@ericchen0121

This comment has been minimized.

Copy link

commented Dec 23, 2013

  1. Open up Terminal
  2. Type in '~/.oh-my-zsh', this should change your directory to the zsh directory.
    -Terminal should read: " .oh-my-zsh git:(master) ". If it does, go to step 3.
  3. Type in "git status" to see that your status is ahead of master.
    -If you're not concerned about the file status changes, you can "stash" those changes by doing step 4.
  4. Type in "git stash" to save the progress in the git and move the head back to master.
  5. Done. Now you should be able to upgrade the next time the terminal asks you too.
@ricbermo

This comment has been minimized.

Copy link

commented Jan 2, 2014

did't work for me. there are some conflicts and I have to fixe them manually

@ODelibalta

This comment has been minimized.

Copy link

commented Jan 9, 2014

It is happening most likely because you have edited something in your .oh-my-zsh directory but you have not committed it.

  1. Navigate to the directory.
  2. Run "git status". It should display a list of files changed.
  3. Stage those files with "git add "
  4. Commit those changes with "git commit -m "

You should be able to upgrade now.

Optional: After step 2, you may be able to just run "git commit -a -m " 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 (: )

@ricbermo

This comment has been minimized.

Copy link

commented Jan 9, 2014

@ODelibalta I've done this without success. there are some conflicts. How can i force this rebase?

@tanookiben

This comment has been minimized.

Copy link

commented Jan 9, 2014

Try

git stash

and then run the upgrade and then

git stash pop

after that to get your changes back.

@ricbermo

This comment has been minimized.

Copy link

commented Jan 9, 2014

I got it. I just solve some conflicts and the git rebase --continue.

@ODelibalta

This comment has been minimized.

Copy link

commented Jan 9, 2014

If it is acting out on merges, I think it is best to look at what the conflict is and go from there. There may be something of more importance that the changes done on your local master branch. If you do not want to do that, use the stash commands. It basically takes a snapshot of the changes and reverts your branch (the one where the head is) to the state where there are no unstaged changes. After you stash your unstaged files on the side, run the update and then run git stash apply which should apply the stash over the files.

http://git-scm.com/book/en/Git-Tools-Stashing

I still suggest to first take a look at the merge conflicts and see how important they are compared to what you have.

@Ekkstein

This comment has been minimized.

Copy link

commented Jan 26, 2014

I have this problem without unstaged changes in my directory...
git status inside ~/.oh-my-zsh
gives:
nothing to commit, working directory clean.

Meanwhile I just deleted the directory and recloned it.
It works now.

@robbyrussell

This comment has been minimized.

Copy link
Owner

commented Mar 13, 2014

Closing this per #2568.

@jfsagasti

This comment has been minimized.

Copy link

commented May 18, 2014

@googolxi

This comment has been minimized.

Copy link

commented Dec 18, 2014

I try the way that delete the option “—rebase” in tools/upgrade.sh.later update oh-my-zsh,success get the new type.Later understand the more better way is "cd .oh_my_zsh"->"git add ."->"git commit -m "change setting" "->so you should can update oh-my-zsh

@RussellBradley

This comment has been minimized.

Copy link

commented Apr 18, 2015

Same problem... One liner fix.

cd "$ZSH" && git stash && upgrade_oh_my_zsh
@lordKnighton

This comment has been minimized.

Copy link

commented Jul 16, 2015

Thanks russelBradley 👍

@OrcunOtacioglu

This comment has been minimized.

Copy link

commented Jul 24, 2015

The one liner solved my issue. Thank you RussellBradley!

@dadocreate

This comment has been minimized.

Copy link

commented Aug 7, 2015

Thanks russelBradley 👍

@cviebrock

This comment has been minimized.

Copy link

commented Aug 21, 2015

And don't forget to git stash pop after you upgrade to re-apply your changes (if desired).

@iamgoodbytes

This comment has been minimized.

Copy link

commented Sep 3, 2015

Thanks @RussellBradley - that works!

@jinga50334

This comment has been minimized.

Copy link

commented Dec 1, 2015

@ODelibalta It works! thank you!

@ylluminarious

This comment has been minimized.

Copy link

commented Jan 2, 2016

$ sudo git reset --hard fixed this for me.

@zhanghanyuan

This comment has been minimized.

Copy link

commented Jan 23, 2016

Thanks russelBradley 👍

@CleverProgrammer

This comment has been minimized.

Copy link

commented Jan 27, 2016

Thanks @RussellBradley 👍

@kayoub5

This comment has been minimized.

Copy link

commented Mar 5, 2016

if any of the above does not work for you try this

cd ~/.oh-my-zsh
git config core.filemode false
@pksurecom

This comment has been minimized.

Copy link

commented May 25, 2016

Thanks russelBradley !

@gerson

This comment has been minimized.

Copy link

commented Jan 14, 2017

Thanks @RussellBradley

@Mark-Creeten

This comment has been minimized.

Copy link

commented Jan 31, 2017

Thanks russelBradley !

@Karthicksree

This comment has been minimized.

Copy link

commented Mar 5, 2017

Thanks @RussellBradley.

@eranhirs

This comment has been minimized.

Copy link

commented Aug 11, 2017

I happen to be working on a Windows 10 ubuntu bash, so the git changes I had were correlated to running dos2unix on the entire directory to fix the ^M character problem.

After successfully updating, you might want to run

cd $ZSH
find . -type f -print0 | xargs -0 dos2unix

To fix errors correlated to the ^M character.

@MrEmelianenko

This comment has been minimized.

Copy link

commented Sep 25, 2017

Improved one-line solution:

cd "$ZSH" && git stash && upgrade_oh_my_zsh && git stash pop
@vidyasagar-r

This comment has been minimized.

Copy link

commented Dec 13, 2017

Thanks @RussellBradley
👍

@bilge-Kagan

This comment has been minimized.

Copy link

commented Mar 20, 2018

@ODelibalta is right if you concern your changes..

1. Navigate to the .oh-my-zsh/ directory.
2. Run git status. It should display a list of files changed.
3. Stage those files with git add [filename(s)]
4. Commit those changes with git commit -m

and then upgrade zsh via upgrade_oh_my_zsh command.
enjoy!..

@softlion

This comment has been minimized.

Copy link

commented Apr 9, 2018

Don't forget pop or you'll loose the changes to your themes.

cd "$ZSH" && git stash && upgrade_oh_my_zsh && git stash pop

@DiscipleOfShinku

This comment has been minimized.

Copy link

commented Jun 14, 2018

Why there is no option to do this automatically?

@paul-bjorkstrand

This comment has been minimized.

Copy link

commented Jul 5, 2018

For those who are getting here when using babun on Windows, I recommend using @kayoub5's method for fixing this (copied below):

cd ~/.oh-my-zsh
git config core.filemode false

Then just let it run the next update.

@testacode

This comment has been minimized.

Copy link

commented Nov 17, 2018

My issue on OSX was I had a .DS_Store file automatically generated inside ~/.oh_my_zsh. Removed that rm .DS_Store and then upgrade_oh_my_zsh and that's it.

@shandou

This comment has been minimized.

Copy link

commented Dec 31, 2018

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 in themes/agnoster.zsh-theme, it is identified as untracked changes and cause upgrade pull to fail. For now, the following steps works for me:

# Step 1: stash the untracked change
cd ~/.oh-my-zsh && git stash

# Step 2: Update by typing the following line in terminal
upgrade_oh_my_zsh

# Step 3: stash pop to recover untracked change
git stash pop
@Natetronn

This comment has been minimized.

Copy link

commented Feb 15, 2019

The file custom/example.zsh was changed. Like many others, I stashed it and the update worked.

@mrsarm

This comment has been minimized.

Copy link

commented Mar 26, 2019

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.

@RezaNurRochmat13

This comment has been minimized.

Copy link

commented Jun 17, 2019

Thanks is worked @RussellBradley

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.