I am using zsh and Oh-My-Zsh on Ubuntu 14.04.

For some reason all directories are indicated to be git repos. This is true for all oh-my-zsh themes, which leads me to believe that this is a zsh issue perhaps related to vcs_info.

  • 1
    Is your home or root directory a git repository? If so, all of its subdirectories will be treated as git repositories as well (at least by git and oh-my-zsh seems to be calling the git executable to display information in the prompt).
    – Wieland
    Jul 29, 2014 at 9:50
  • 1
    vcs_info uses git rev-parse --is-inside-work-tree to determine if you are currently in a git repository. You can use git rev-parse --git-dir to find out where the .git directory for this repository is.
    – Adaephon
    Jul 29, 2014 at 11:30
  • Thank you both.I had somehow managed to create a git repo in /.
    – mac
    Jul 29, 2014 at 11:48
  • 1
    @Networker Do not use code markup for things that are not code. Proper names are not code. Jul 29, 2014 at 21:52

1 Answer 1


Any sub directory to a directory containing a git repo will be identified as a git repo. I had accidentally created a git repo in / which resulted in all directories being identified as git repos.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .