Skip to content

解决 oh-my-zsh git 进入目录卡顿问题 #11

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

Open
yangruihan opened this issue Sep 27, 2020 · 2 comments
Open

解决 oh-my-zsh git 进入目录卡顿问题 #11

yangruihan opened this issue Sep 27, 2020 · 2 comments

Comments

@yangruihan
Copy link
Owner

解决 oh-my-zsh git 进入目录卡顿问题

问题描述

使用oh-my-zsh进入一个大型git仓库的时候会非常的慢,并且执行命令也会非常的卡

问题原因

是因为在进入目录的时候,oh-my-zsh会去获取git的更新信息,当仓库很大的时候就会非常慢了

解决方案

设置 oh-my-zsh 不读取文件变化信息(在 git 项目目录执行下列命令)

$ git config --add oh-my-zsh.hide-dirty 1

如果你还觉得慢,可以再设置 oh-my-zsh 不读取任何 git 信息

$ git config --add oh-my-zsh.hide-status 1

如果想恢复显示,可以将1改为0,或者git config --remove-section oh-my-zsh

参考资料

https://blog.csdn.net/a_ran/article/details/72847022?utm_medium=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param

@kangjiantsui
Copy link

👍

@frank-amy
Copy link

doesn't work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants