2

I get git:(master) on every directory in the terminal ( There is no .git directory ).

How to remove that and only show git info if there is a git repo. This is how it looks right now:

enter image description here

I am using oh my zsh with the default theme.

I have tried to reinstall iterm2 and oh my zsh but the same issue.

Here is my echo $PS1 result:

%(?:%{%}➜ :%{%}➜ ) %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)

Thanks!

Rakesh K
  • 1,290
  • 1
  • 16
  • 43
  • These answers that show how to do it without oh-my-zsh might help: https://stackoverflow.com/a/66104574/9307265 and https://stackoverflow.com/a/64094551/9307265 . Not sure how to make it work with omz. – Gairfowl Feb 15 '21 at 05:33

0 Answers0