I\'m sorry if this is a duplicate, I\'ve searched google and SO and couldn\'t find anything similar since it\'s a fairly generic set of words to search for!
What I w
You can specify the path to the git repository explicitly with the --git-dir global option for all git commands. When you use this option with init it usually creates a bare repository but if you supply --work-tree as well you can initialize a non-bare repository with a 'detached' working tree.
git --git-dir=/var/repo/one.git --work-tree=/var/work/one init
From then on, you still have to supply either the --git-dir option or set GIT_DIR environment variable so that git knows where the repository is as there is no git specific data at all inside the working tree, but the working tree will be determined appropriately from the git repository config.