Read from `GIT_DIR` or if it's null from `.git`