为什么更新 Oh My Zsh 会给我一个关于使用未暂存更改重新定位的错误?

n8m*_*mob 7 oh-my-zsh

我打开了一个终端窗口,Oh My Zsh 想检查更新。我输入Y是,然后收到错误消息:

无法使用 rebase 拉取:您有未暂存的更改。
请提交或隐藏它们。

我试过了git status,Git 告诉我当前目录不是存储库(这并不让我感到惊讶)。

那么,它在抱怨什么呢?

mnm*_*mnc 5

您可能对配置文件进行了更改。转到您的oh-my-zsh目录并输入git status.

我的结果(我改变了主题之一):

?? jane  ~
?? ? cd .oh-my-zsh                                                      1:57:10
?? jane  ~/.oh-my-zsh  ‹master*›
?? ? git status                                                         1:57:17
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:   themes/bira.zsh-theme

no changes added to commit (use "git add" and/or "git commit -a")
Run Code Online (Sandbox Code Playgroud)

您将看到一些文件已被修改。

您可以输入git stash暂时删除这些更改,然后再次尝试更新。