15
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Oh-My-Zshをアップデートできない問題

Last updated at Posted at 2015-06-23

問題

Oh-My-Zshをアップデートしようとすると以下のエラーメッセージが出て、アップデートできなくなりました。

$ upgrade_oh_my_zsh
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?

解決方法

https://github.com/robbyrussell/oh-my-zsh/issues/1991
によると、
.oh_my_zshディレクトリ以下のリポジトリの変更をコミットすれば直るらしい。
(後々冷静にエラーメッセージを見たら、「変更点があってrebaseしてpullできないからcommitするかstashして」って書いてあったけど、問題発生時にはよく分からなかった)

git statusで確認すると、

$ cd ~/.oh_my_zsh
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   custom/example.zsh

no changes added to commit (use "git add" and/or "git commit -a")

custom/example.zshに変更点があるっぽい。
(イジった記憶なし)

というわけで、変更をコミットすると、

$ cd ~/.oh_my_zsh
$ git add .
$ git commit -m "適当なコミットメッセージ"
$ upgrade_oh_my_zsh

Oh-My-Zshをアップデートできるようになりました。

参考サイト

Can't update using upgrade_oh_my_zsh · Issue #1991 · robbyrussell/oh-my-zsh

15
15
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
15
15

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?