I'm using oh-my-zsh
➜ ~ brew -h
fatal: Invalid gitfile format: .git
fatal: Invalid gitfile format: .git
➜ ~ brew update
fatal: Invalid gitfile format: .git
fatal: Invalid gitfile format: .git
How to fix this problem?
Do you have a .git file under ~, which happens to be empty?
In my case, I cannot do git command under, say my/path,. I found an empty file in my/path, I deleted that file and everything works now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With