Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Zsh / Oh-my-zsh on Windows Git Bash


  1. Download the latest zsh package:




The package now is compacted using zstd, so now we need some "special" extractor.
So, in my case, I've downloaded this file And extracted it using the Peazip.

  1. Extract the content to your git bash installation dir:

Usually C:\Program Files\Git

  1. Test it and config zsh:

Open git bash and type:


So, this step is important, it seems zsh will ask a few configurations, like the tab completion, history, etc.
Please read the options and set that according to your use.

  1. Installing oh-my-zsh, execute the following cmd on git bash
sh -c "$(curl -fsSL"
  1. Configuring zsh as default shell

Edit the ~/.bashrc file. (create it if it doesn't exist)

Add the following lines at the end of the file

# Launch Zsh
if [ -t 1 ]; then
exec zsh

Close and open again the git bash.

Optional steps

  1. Installing the Honukay theme
curl -fsSL -o ~/.oh-my-zsh/custom/themes/honukai.zsh-theme
  1. Set it
sed -i 's/ZSH_THEME="robbyrussell"/ZSH_THEME="honukai"/g' ~/.zshrc
Copy link

Salloom99 commented Jun 16, 2022

I noticed an issue with root directory autocompletion when I type for example "/c/use" and hit tab it won't find it, except in git bash I could get the autocompletion correctly and with capitalized folders like "/c/Users"

Copy link

hatakawas commented Jun 17, 2022

I personally still have issues with trying to fix the ERROR: this script is obsolete, please see git-completion.zsh that pops up each time I open ZSH.

I've tried all the methods mentioned above by @wl2776 and @michelpfirter

Where exactly in git/etc/zsh should I place those two lines?

local drives=($(mount | command grep --perl-regexp '^\w: on /\w ' | cut --delimiter=' ' --fields=3))
zstyle ':completion:*' fake-files "/:${(j. .)drives//\//}"

UPDATE I was looking at solving slow performance in zsh, and stumbled upon this: adding those 2 lines at the .gitconfig files in the home directory

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

Not only did it speed up my zsh significantly, it also removed the error somehow, not sure exactly why.


Thanks, it works for me!

The 2 lines of "git config", seems it just hide the error but the error still there. I don't like this.

I added the "local drivers" and "zstyles" lines to /etc/zshprofile located in C:\Program Files\Git\etc\zsh
Then the ERROR messge gone.

Copy link

thienbao12a2 commented Jun 20, 2022

I am having an issue in vscode terminal where typing text, then removing it will leave small pixel on the screen like in the picture. Could you please help me fix this issue? Thank you

Copy link

tanishqmanuja commented Jul 25, 2022

Same pixel issue for me also

Copy link

HaiLin545 commented Aug 2, 2022

Is any one help with this problem ? zsh on git-bash cant't user "conda activate" and "source activate",it horrible!

Copy link

fworks commented Aug 8, 2022

Is any one help with this problem ? zsh on git-bash cant't user "conda activate" and "source activate",it horrible! image

Hi, I think it is not a zsh thing, it is more a git-bash/windows thing.
I remember using conda before on git bash, I think you have to use the conda activate comand instead of source activate.

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