I have GIT_WORK_TREE set to . and GIT_DIR set to .git. When I run git init --bare, I get the following error:
fatal:
GIT_WORK_TREE(or--work-tree=<directory>) not allowed without specifyingGIT_DIR(or--git-dir=<directory>)
What's up with that? I suspect that it might have something to do with GIT_DIR being set to . (maybe it considers GIT_DIR unset if it points to the current working directory?). Regardless, it would be great to have this behave properly so I don't have to unset GIT_WORK_TREE every time I want to initialize a Git repo.
 
    