Search code examples
gitwindows-10zshwindows-subsystem-for-linux

Git worktrees not showing branch names, but recognizing branches


I recently enabled Windows Subsystem for Linux 2 (WSL2) on Windows 10 and installed Debian.

I also installed zsh with several plugins. You can see the dotfiles repo here: https://github.com/art3xias23/wsl-dotfiles

I'm using Windows Terminal, however there is no difference if I use gitbash and debian on their own or inside Windows Terminal.

My issue is:

I have a repo with 3 worktrees on my windows home directory.

When I use git bash for windows I can see the branch names fine after the directory.

GitBash

Repo1: enter image description here

Repo2: enter image description here

ZSHELL

Now when I move to zsh and try to access the same windows home directory worktrees, I can see the branch name for only the first repo and not the second or third (The first repo contains the .git directory)

I also don't see any other branch names, like the one for the my wsl-dotfiles repo, which is my wsl home directory

====================================

enter image description here

====================================

Repo1: enter image description here

====================================

Repo2: enter image description here

====================================

Would anyone know why the branch names are not appearing.


Solution

  • Below I'll display my findings and close this question.

    1. Home directory branch not showing:

      Commenting out this line in my.p10k.zsh solved the issue

      typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'

    2. Git worktree branch name not showing.

      Not yet supported as discussed here and here