git --git-dir /foo/bar/ rest-of-git-command
ref:
--git-dir=<path>
Set the path to the repository. This can also be controlled by setting the GIT_DIR environment variable. It can be an absolute path or relative path to current working directory.