The problem was a lot of shell settings.
If I try to create a new repo with git init, it will give me fatal: bad default revision 'HEAD'twice.
If I do git log, he gives me the same error three times.
I deleted ~/.git, ~/.configand ~/.gitconfigbased on other answers that I found, indicating that I created a repo in my home directory. The only repo that does not give me this problem is the one I cloned from someone else.
I'm not sure what I did, other than deleting anything in my home directory with git info.
On request:
jsw:~ jsw$ mkdir test
jsw:~ jsw$ cd test
jsw:test jsw$ git init
Initialized empty Git repository in /Users/jsw/test/.git/
fatal: bad default revision 'HEAD'
fatal: bad default revision 'HEAD'
jsw:test(master|23448707m) jsw$ cat .git/HEAD
ref: refs/heads/master
fatal: bad default revision 'HEAD'
fatal: bad default revision 'HEAD'
jsw:~ jsw$ git status
fatal: Not a git repository (or any of the parent directories): .git
source
share