Description
After running git worktree move and navigating into the new directory, the prompt shows no git information — the directory is not recognized as a git repo. This persists until the shell is fully reloaded (exec zsh or omz reload).
This is unexpected because navigating into any other git repo directory (including other worktrees that were not moved) works correctly.
Environment
- Shell:
oh-my-zsh
- Theme:
powerlevel10k
- Repo setup: bare repo with linked worktrees
Steps to Reproduce
- Set up a bare repo with one or more linked worktrees
- Navigate into a worktree — prompt displays git info correctly
- Run
git worktree move <old-path> <new-path>
- Navigate into
Expected Behavior
Prompt recognizes the directory as a git repo and displays git status, the same as navigating into any other git repo directory for the first time.
Actual Behavior
Prompt displays no git information. The directory is not recognized as a git repo.
Verification That Git Is Healthy
Running the following inside returns correct output — git itself is
functioning normally after the move:
$ cat .git
gitdir: /path/to/repo/.bare/worktrees/<name>
$ git rev-parse --git-dir
/path/to/repo/.bare/worktrees/<name>
$ git rev-parse --show-toplevel
/path/to/repo/<new-path>
Workaround
exec zsh or omz reload
Description
After running git worktree move and navigating into the new directory, the prompt shows no git information — the directory is not recognized as a git repo. This persists until the shell is fully reloaded (
exec zshoromz reload).This is unexpected because navigating into any other git repo directory (including other worktrees that were not moved) works correctly.
Environment
oh-my-zshpowerlevel10kSteps to Reproduce
git worktree move <old-path> <new-path>Expected Behavior
Prompt recognizes the directory as a git repo and displays git status, the same as navigating into any other git repo directory for the first time.
Actual Behavior
Prompt displays no git information. The directory is not recognized as a git repo.
Verification That Git Is Healthy
Running the following inside returns correct output — git itself is
functioning normally after the move:
Workaround
exec zshoromz reload