Run git using --git-dir instead of GIT_DIR.