[实践OK]Mac 上 Oh My Zsh 无法更新,zsh自动完成的提示位置在 /usr/local/share/zsh/site-functions。
zsh completions and functions have been installed to:
/usr/local/share/zsh/site-functions
mac下面sudo su - 后出现:
sudo su
Password:
[Oh My Zsh] Would you like to update? [Y/n]: y
Updating Oh My Zsh
error: 不能变基式拉取:您有未暂存的变更。
error: 请提交或贮藏它们。
There was an error updating. Try again later?
最后我的解决办法是:
cd ~/.oh-my-zsh/
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
尚未暂存以备提交的变更:
(使用 "git add <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
类型变更: plugins/fedora/fedora.plugin.zsh
类型变更: plugins/go/go.plugin.zsh
类型变更: plugins/gradle/_gradle
类型变更: plugins/gradle/_gradlew
类型变更: plugins/per-directory-history/per-directory-history.plugin.zsh
git reset --hard origin/master #强制让本地的代码和远端一致
HEAD 现在位于 08da19e3 emacs: revert cab1ac6e682038b2ceca9d16f8c458c0e79149ca (#7765)
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
git pull
remote: Enumerating objects: 9644, done.
root@bogon# upgrade_oh_my_zsh
Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.
Updating Oh My Zsh
From https://github.com/ohmyzsh/ohmyzsh
* branch master -> FETCH_HEAD
Current branch master is up to date.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Oh My Zsh is already at the latest version.
To keep up with the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh
Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh
参考:https://www.chendalei.com/articles/2018/10/09/1539052284615.html
提示:
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?
这种情况很可能发生,因为您已经在.oh-my-zsh目录中编辑了一些内容但尚未提交。
导航到该目录(.oh-my-zsh/目录)。
运行git status。 它应该显示已更改的文件列表。
使用git add暂存这些文件
使用git commit -m提交这些更改
你现在应该可以升级了。
可选:在步骤2之后,您可以运行git commit -a -m,它应该暂存所有未暂存的文件并提交这些更改(组合步骤3和4)。
然后通过upgrade_oh_my_zsh命令升级zsh。
参考来源:https://github.com/robbyrussell/oh-my-zsh/issues/1984
/usr/local/share/zsh/site-functions
mac下面sudo su - 后出现:
sudo su
Password:
[Oh My Zsh] Would you like to update? [Y/n]: y
Updating Oh My Zsh
error: 不能变基式拉取:您有未暂存的变更。
error: 请提交或贮藏它们。
There was an error updating. Try again later?
最后我的解决办法是:
cd ~/.oh-my-zsh/
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
尚未暂存以备提交的变更:
(使用 "git add <文件>..." 更新要提交的内容)
(使用 "git restore <文件>..." 丢弃工作区的改动)
类型变更: plugins/fedora/fedora.plugin.zsh
类型变更: plugins/go/go.plugin.zsh
类型变更: plugins/gradle/_gradle
类型变更: plugins/gradle/_gradlew
类型变更: plugins/per-directory-history/per-directory-history.plugin.zsh
git reset --hard origin/master #强制让本地的代码和远端一致
HEAD 现在位于 08da19e3 emacs: revert cab1ac6e682038b2ceca9d16f8c458c0e79149ca (#7765)
git status
位于分支 master
您的分支与上游分支 'origin/master' 一致。
git pull
remote: Enumerating objects: 9644, done.
root@bogon# upgrade_oh_my_zsh
Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.
Updating Oh My Zsh
From https://github.com/ohmyzsh/ohmyzsh
* branch master -> FETCH_HEAD
Current branch master is up to date.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Oh My Zsh is already at the latest version.
To keep up with the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh
Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh
参考:https://www.chendalei.com/articles/2018/10/09/1539052284615.html
提示:
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?
这种情况很可能发生,因为您已经在.oh-my-zsh目录中编辑了一些内容但尚未提交。
导航到该目录(.oh-my-zsh/目录)。
运行git status。 它应该显示已更改的文件列表。
使用git add暂存这些文件
使用git commit -m提交这些更改
你现在应该可以升级了。
可选:在步骤2之后,您可以运行git commit -a -m,它应该暂存所有未暂存的文件并提交这些更改(组合步骤3和4)。
然后通过upgrade_oh_my_zsh命令升级zsh。
参考来源:https://github.com/robbyrussell/oh-my-zsh/issues/1984
作者:jackxiang@向东博客 专注WEB应用 构架之美 --- 构架之美,在于尽态极妍 | 应用之美,在于药到病除
地址:https://jackxiang.com/post/11020/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
最后编辑: jackxiang 编辑于2024-7-4 17:07
评论列表