isbase
isbase

Reputation: 71

Homebrew always prompted fatal: Invalid gitfile format: .git

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?

Upvotes: 4

Views: 14282

Answers (2)

Himanshu Jotwani
Himanshu Jotwani

Reputation: 406

You can remove the already available .git file from that folder using terminal in case of debian based systems .

sudo rm directoryname/.git/

Upvotes: 2

user3083108
user3083108

Reputation: 80

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.

Upvotes: 6

Related Questions