I am having an issue where the output of git branch
is empty without sudo
. This applies to any git repo (at least all that I have tested), including new ones. I have tested this in zsh
, bash3
and bash5
, both with the bundled version of git
and the Homebrew version. Interestingly, git checkout
autocomplete (using git plugin of oh-my-zsh) still works as expected, as well as git branch --show-current
.
I suspect a UNIX permission problem, but I cannot find any file or directory in .git/
that does not have -r--r--r--
permissions or higher, or that are not owned by current user.