Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew always prompted fatal: Invalid gitfile format: .git

Tags:

homebrew

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?

like image 761
isbase Avatar asked Oct 16 '25 19:10

isbase


1 Answers

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.

like image 105
user3083108 Avatar answered Oct 18 '25 12:10

user3083108



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!