Skip to Content

Disable Git prompt in Oh My ZSH

Posted on

I love the Oh My ZSH framework for Z Shell and I use it on almost every machine today. However in some Vagrant boxes I sometimes run into trouble with the Git prompt.

Because of a large Git repository or slow directory mounts, it sometimes takes a couple of seconds before the shell reappears after entering a command.

Luckily, there is a simple command to disable the Git shell, either globally or per repository. Because I keep forgetting it, I thought I’d write it down in my blog:

The following command:

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

will disable the Git status prompt in your current repository. Add the --global flag to make it apply to all repositories on the machine.

Update Dominic Farolino has kindly pointed out to me that the flag name was changed on December 10th 2020 to hide-info:

git config oh-my-zsh.hide-info 1
comments powered by Disqus